From: Elise Lennion Date: Sat, 15 Oct 2016 00:35:13 +0000 (-0300) Subject: staging: dgnc: Add const qualifier to struct declaration. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d44e0e5ddc3ec4c7387a4044ede659781babc329;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: dgnc: Add const qualifier to struct declaration. Const qualifier added to struct declaration to avoid data overwrite during runtime and improve security. Signed-off-by: Elise Lennion Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index fd372d3afa46..6576674e75b0 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -93,7 +93,7 @@ struct board_id { unsigned int is_pci_express; }; -static struct board_id dgnc_ids[] = { +static const struct board_id dgnc_ids[] = { { PCI_DEVICE_CLASSIC_4_PCI_NAME, 4, 0 }, { PCI_DEVICE_CLASSIC_4_422_PCI_NAME, 4, 0 }, { PCI_DEVICE_CLASSIC_8_PCI_NAME, 8, 0 }, diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index ef9a45bc0b89..cf8aefdc9534 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -50,7 +50,7 @@ static unsigned char *dgnc_TmpWriteBuf; /* * Default transparent print information. */ -static struct digi_t dgnc_digi_init = { +static const struct digi_t dgnc_digi_init = { .digi_flags = DIGI_COOK, /* Flags */ .digi_maxcps = 100, /* Max CPS */ .digi_maxchar = 50, /* Max chars in print queue */