aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/k10temp.c
diff options
context:
space:
mode:
authorMárton Németh <nm127@freemail.hu>2010-01-10 20:52:35 +0100
committerJean Delvare <khali@linux-fr.org>2010-01-10 20:52:35 +0100
commit3dd3a156355e7e6bec0dc9a0bbb6eeecbd965d50 (patch)
tree3dcc7bd17a057db82055c5c04eca51bca863cffd /drivers/hwmon/k10temp.c
parenthwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs (diff)
downloadlinux-dev-3dd3a156355e7e6bec0dc9a0bbb6eeecbd965d50.tar.xz
linux-dev-3dd3a156355e7e6bec0dc9a0bbb6eeecbd965d50.zip
hwmon: Make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make pci_device_id also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/k10temp.c')
-rw-r--r--drivers/hwmon/k10temp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 4c9d349b3ad9..099a2138cdf6 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -195,7 +195,7 @@ static void __devexit k10temp_remove(struct pci_dev *pdev)
dev_set_drvdata(&pdev->dev, NULL);
}
-static struct pci_device_id k10temp_id_table[] = {
+static const struct pci_device_id k10temp_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) },
{}