aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-10-01 04:54:00 -0400
committerLen Brown <len.brown@intel.com>2010-10-01 19:28:51 -0400
commit620e112cfe1c9281c176de8ad1a7691c4eb4950d (patch)
treeb7a2b5b389396ac1b90f7d586af568044df7804f /drivers/pnp
parent2b2ae7c7f8e25043793042eb9df88aa875b4cff8 (diff)
ACPI/PNP: A HID value of an object never changes -> make it const
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/base.h5
-rw-r--r--drivers/pnp/core.c3
-rw-r--r--drivers/pnp/driver.c2
-rw-r--r--drivers/pnp/pnpacpi/core.c2
4 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index 0bab84ebb15d..19bc73695475 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -12,11 +12,12 @@ void pnp_unregister_protocol(struct pnp_protocol *protocol);
12 12
13#define PNP_EISA_ID_MASK 0x7fffffff 13#define PNP_EISA_ID_MASK 0x7fffffff
14void pnp_eisa_id_to_string(u32 id, char *str); 14void pnp_eisa_id_to_string(u32 id, char *str);
15struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id, char *pnpid); 15struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id,
16 const char *pnpid);
16struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid); 17struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid);
17 18
18int pnp_add_device(struct pnp_dev *dev); 19int pnp_add_device(struct pnp_dev *dev);
19struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id); 20struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id);
20 21
21int pnp_add_card(struct pnp_card *card); 22int pnp_add_card(struct pnp_card *card);
22void pnp_remove_card(struct pnp_card *card); 23void pnp_remove_card(struct pnp_card *card);
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 88b3cde52596..c79ee1ded68d 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -124,7 +124,8 @@ static void pnp_release_device(struct device *dmdev)
124 kfree(dev); 124 kfree(dev);
125} 125}
126 126
127struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid) 127struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id,
128 const char *pnpid)
128{ 129{
129 struct pnp_dev *dev; 130 struct pnp_dev *dev;
130 struct pnp_id *dev_id; 131 struct pnp_id *dev_id;
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index cd11b113494f..d1dbb9df53fa 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -236,7 +236,7 @@ void pnp_unregister_driver(struct pnp_driver *drv)
236 * @dev: pointer to the desired device 236 * @dev: pointer to the desired device
237 * @id: pointer to an EISA id string 237 * @id: pointer to an EISA id string
238 */ 238 */
239struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id) 239struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)
240{ 240{
241 struct pnp_id *dev_id, *ptr; 241 struct pnp_id *dev_id, *ptr;
242 242
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index dc4e32e031e9..4aafcf89b03b 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -59,7 +59,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)
59#define TEST_ALPHA(c) \ 59#define TEST_ALPHA(c) \
60 if (!('@' <= (c) || (c) <= 'Z')) \ 60 if (!('@' <= (c) || (c) <= 'Z')) \
61 return 0 61 return 0
62static int __init ispnpidacpi(char *id) 62static int __init ispnpidacpi(const char *id)
63{ 63{
64 TEST_ALPHA(id[0]); 64 TEST_ALPHA(id[0]);
65 TEST_ALPHA(id[1]); 65 TEST_ALPHA(id[1]);