提交 e9fb13bf 编写于 作者: J Joe Perches 提交者: Dominik Brodowski

pcmcia: Make declaration and uses of struct pcmcia_device_id const

Const allows tables to be moved into text sections.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 37fac4b6
...@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL"); ...@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
static void pcmcia_check_driver(struct pcmcia_driver *p_drv) static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
{ {
struct pcmcia_device_id *did = p_drv->id_table; const struct pcmcia_device_id *did = p_drv->id_table;
unsigned int i; unsigned int i;
u32 hash; u32 hash;
...@@ -784,7 +784,7 @@ static inline int pcmcia_load_firmware(struct pcmcia_device *dev, char * filenam ...@@ -784,7 +784,7 @@ static inline int pcmcia_load_firmware(struct pcmcia_device *dev, char * filenam
static inline int pcmcia_devmatch(struct pcmcia_device *dev, static inline int pcmcia_devmatch(struct pcmcia_device *dev,
struct pcmcia_device_id *did) const struct pcmcia_device_id *did)
{ {
if (did->match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID) { if (did->match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID) {
if ((!dev->has_manf_id) || (dev->manf_id != did->manf_id)) if ((!dev->has_manf_id) || (dev->manf_id != did->manf_id))
...@@ -890,7 +890,7 @@ static int pcmcia_bus_match(struct device *dev, struct device_driver *drv) ...@@ -890,7 +890,7 @@ static int pcmcia_bus_match(struct device *dev, struct device_driver *drv)
{ {
struct pcmcia_device *p_dev = to_pcmcia_dev(dev); struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
struct pcmcia_driver *p_drv = to_pcmcia_drv(drv); struct pcmcia_driver *p_drv = to_pcmcia_drv(drv);
struct pcmcia_device_id *did = p_drv->id_table; const struct pcmcia_device_id *did = p_drv->id_table;
struct pcmcia_dynid *dynid; struct pcmcia_dynid *dynid;
/* match dynamic devices first */ /* match dynamic devices first */
......
...@@ -56,7 +56,7 @@ struct pcmcia_driver { ...@@ -56,7 +56,7 @@ struct pcmcia_driver {
int (*resume) (struct pcmcia_device *dev); int (*resume) (struct pcmcia_device *dev);
struct module *owner; struct module *owner;
struct pcmcia_device_id *id_table; const struct pcmcia_device_id *id_table;
struct device_driver drv; struct device_driver drv;
struct pcmcia_dynids dynids; struct pcmcia_dynids dynids;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册