diff options
author | Márton Németh <nm127@freemail.hu> | 2010-01-10 01:11:03 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-16 19:49:21 +0000 |
commit | 5e89a3484dea8a3d962f83fe497d064fbcde4e55 (patch) | |
tree | ca39c77d280cf72647d3e8468dd2e66282ae3ee7 /drivers/net/ks8851.c | |
parent | 936034026280facd7050c96c3b28339f28b09cdd (diff) |
leds: make PCI device id 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@
disable decl_init,const_decl_init;
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>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/net/ks8851.c')
0 files changed, 0 insertions, 0 deletions