Skip to content

Commit

Permalink
hwmon: (i5k_amb) constify pci_device_id
Browse files Browse the repository at this point in the history
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   3562	    320	      8	   3890	    f32	drivers/hwmon/i5k_amb.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   3658	    224	      8	   3890	    f32	drivers/hwmon/i5k_amb.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
ArvindYadavCs authored and groeck committed Aug 13, 2017
1 parent bb923fd commit 4d3f241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/i5k_amb.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static struct {
};

#ifdef MODULE
static struct pci_device_id i5k_amb_ids[] = {
static const struct pci_device_id i5k_amb_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
{ 0, }
Expand Down

0 comments on commit 4d3f241

Please sign in to comment.