diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/card.c | 7 | ||||
-rw-r--r-- | drivers/pnp/driver.c | 12 | ||||
-rw-r--r-- | drivers/pnp/interface.c | 8 | ||||
-rw-r--r-- | drivers/pnp/manager.c | 1 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 2 |
6 files changed, 18 insertions, 14 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 97eeecfaef1b..add12f7c489a 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c | |||
@@ -140,7 +140,7 @@ static void pnp_release_card(struct device *dmdev) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | 142 | ||
143 | static ssize_t pnp_show_card_name(struct device *dmdev, char *buf) | 143 | static ssize_t pnp_show_card_name(struct device *dmdev, struct device_attribute *attr, char *buf) |
144 | { | 144 | { |
145 | char *str = buf; | 145 | char *str = buf; |
146 | struct pnp_card *card = to_pnp_card(dmdev); | 146 | struct pnp_card *card = to_pnp_card(dmdev); |
@@ -150,7 +150,7 @@ static ssize_t pnp_show_card_name(struct device *dmdev, char *buf) | |||
150 | 150 | ||
151 | static DEVICE_ATTR(name,S_IRUGO,pnp_show_card_name,NULL); | 151 | static DEVICE_ATTR(name,S_IRUGO,pnp_show_card_name,NULL); |
152 | 152 | ||
153 | static ssize_t pnp_show_card_ids(struct device *dmdev, char *buf) | 153 | static ssize_t pnp_show_card_ids(struct device *dmdev, struct device_attribute *attr, char *buf) |
154 | { | 154 | { |
155 | char *str = buf; | 155 | char *str = buf; |
156 | struct pnp_card *card = to_pnp_card(dmdev); | 156 | struct pnp_card *card = to_pnp_card(dmdev); |
@@ -259,7 +259,6 @@ int pnp_add_card_device(struct pnp_card * card, struct pnp_dev * dev) | |||
259 | 259 | ||
260 | /** | 260 | /** |
261 | * pnp_remove_card_device- removes a device from the specified card | 261 | * pnp_remove_card_device- removes a device from the specified card |
262 | * @card: pointer to the card to remove from | ||
263 | * @dev: pointer to the device to remove | 262 | * @dev: pointer to the device to remove |
264 | */ | 263 | */ |
265 | 264 | ||
@@ -274,7 +273,7 @@ void pnp_remove_card_device(struct pnp_dev * dev) | |||
274 | 273 | ||
275 | /** | 274 | /** |
276 | * pnp_request_card_device - Searches for a PnP device under the specified card | 275 | * pnp_request_card_device - Searches for a PnP device under the specified card |
277 | * @lcard: pointer to the card link, cannot be NULL | 276 | * @clink: pointer to the card link, cannot be NULL |
278 | * @id: pointer to a PnP ID structure that explains the rules for finding the device | 277 | * @id: pointer to a PnP ID structure that explains the rules for finding the device |
279 | * @from: Starting place to search from. If NULL it will start from the begining. | 278 | * @from: Starting place to search from. If NULL it will start from the begining. |
280 | */ | 279 | */ |
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index d64c1ca4fa76..1d037c2a82ac 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c | |||
@@ -160,10 +160,16 @@ struct bus_type pnp_bus_type = { | |||
160 | }; | 160 | }; |
161 | 161 | ||
162 | 162 | ||
163 | static int count_devices(struct device * dev, void * c) | ||
164 | { | ||
165 | int * count = c; | ||
166 | (*count)++; | ||
167 | return 0; | ||
168 | } | ||
169 | |||
163 | int pnp_register_driver(struct pnp_driver *drv) | 170 | int pnp_register_driver(struct pnp_driver *drv) |
164 | { | 171 | { |
165 | int count; | 172 | int count; |
166 | struct list_head *pos; | ||
167 | 173 | ||
168 | pnp_dbg("the driver '%s' has been registered", drv->name); | 174 | pnp_dbg("the driver '%s' has been registered", drv->name); |
169 | 175 | ||
@@ -177,9 +183,7 @@ int pnp_register_driver(struct pnp_driver *drv) | |||
177 | /* get the number of initial matches */ | 183 | /* get the number of initial matches */ |
178 | if (count >= 0){ | 184 | if (count >= 0){ |
179 | count = 0; | 185 | count = 0; |
180 | list_for_each(pos,&drv->driver.devices){ | 186 | driver_for_each_device(&drv->driver, NULL, &count, count_devices); |
181 | count++; | ||
182 | } | ||
183 | } | 187 | } |
184 | return count; | 188 | return count; |
185 | } | 189 | } |
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 53fac8ba5d5c..a2d8ce7fef9c 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
@@ -205,7 +205,7 @@ static void pnp_print_option(pnp_info_buffer_t *buffer, char *space, | |||
205 | } | 205 | } |
206 | 206 | ||
207 | 207 | ||
208 | static ssize_t pnp_show_options(struct device *dmdev, char *buf) | 208 | static ssize_t pnp_show_options(struct device *dmdev, struct device_attribute *attr, char *buf) |
209 | { | 209 | { |
210 | struct pnp_dev *dev = to_pnp_dev(dmdev); | 210 | struct pnp_dev *dev = to_pnp_dev(dmdev); |
211 | struct pnp_option * independent = dev->independent; | 211 | struct pnp_option * independent = dev->independent; |
@@ -236,7 +236,7 @@ static ssize_t pnp_show_options(struct device *dmdev, char *buf) | |||
236 | static DEVICE_ATTR(options,S_IRUGO,pnp_show_options,NULL); | 236 | static DEVICE_ATTR(options,S_IRUGO,pnp_show_options,NULL); |
237 | 237 | ||
238 | 238 | ||
239 | static ssize_t pnp_show_current_resources(struct device *dmdev, char *buf) | 239 | static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_attribute *attr, char *buf) |
240 | { | 240 | { |
241 | struct pnp_dev *dev = to_pnp_dev(dmdev); | 241 | struct pnp_dev *dev = to_pnp_dev(dmdev); |
242 | int i, ret; | 242 | int i, ret; |
@@ -308,7 +308,7 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, char *buf) | |||
308 | extern struct semaphore pnp_res_mutex; | 308 | extern struct semaphore pnp_res_mutex; |
309 | 309 | ||
310 | static ssize_t | 310 | static ssize_t |
311 | pnp_set_current_resources(struct device * dmdev, const char * ubuf, size_t count) | 311 | pnp_set_current_resources(struct device * dmdev, struct device_attribute *attr, const char * ubuf, size_t count) |
312 | { | 312 | { |
313 | struct pnp_dev *dev = to_pnp_dev(dmdev); | 313 | struct pnp_dev *dev = to_pnp_dev(dmdev); |
314 | char *buf = (void *)ubuf; | 314 | char *buf = (void *)ubuf; |
@@ -444,7 +444,7 @@ pnp_set_current_resources(struct device * dmdev, const char * ubuf, size_t count | |||
444 | static DEVICE_ATTR(resources,S_IRUGO | S_IWUSR, | 444 | static DEVICE_ATTR(resources,S_IRUGO | S_IWUSR, |
445 | pnp_show_current_resources,pnp_set_current_resources); | 445 | pnp_show_current_resources,pnp_set_current_resources); |
446 | 446 | ||
447 | static ssize_t pnp_show_current_ids(struct device *dmdev, char *buf) | 447 | static ssize_t pnp_show_current_ids(struct device *dmdev, struct device_attribute *attr, char *buf) |
448 | { | 448 | { |
449 | char *str = buf; | 449 | char *str = buf; |
450 | struct pnp_dev *dev = to_pnp_dev(dmdev); | 450 | struct pnp_dev *dev = to_pnp_dev(dmdev); |
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 65ecef738537..6c510c19ad7d 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -390,6 +390,7 @@ fail: | |||
390 | * pnp_manual_config_dev - Disables Auto Config and Manually sets the resource table | 390 | * pnp_manual_config_dev - Disables Auto Config and Manually sets the resource table |
391 | * @dev: pointer to the desired device | 391 | * @dev: pointer to the desired device |
392 | * @res: pointer to the new resource config | 392 | * @res: pointer to the new resource config |
393 | * @mode: 0 or PNP_CONFIG_FORCE | ||
393 | * | 394 | * |
394 | * This function can be used by drivers that want to manually set thier resources. | 395 | * This function can be used by drivers that want to manually set thier resources. |
395 | */ | 396 | */ |
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index e939c93a931c..778a324028f4 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -182,7 +182,7 @@ static int pnp_dock_thread(void * unused) | |||
182 | msleep_interruptible(2000); | 182 | msleep_interruptible(2000); |
183 | 183 | ||
184 | if(signal_pending(current)) { | 184 | if(signal_pending(current)) { |
185 | if (try_to_freeze(PF_FREEZE)) | 185 | if (try_to_freeze()) |
186 | continue; | 186 | continue; |
187 | break; | 187 | break; |
188 | } | 188 | } |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index 9001b6f0204d..e305bb132c24 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifdef CONFIG_PCI | 11 | #ifdef CONFIG_PCI |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #else | 13 | #else |
14 | inline void pcibios_penalize_isa_irq(int irq) {} | 14 | inline void pcibios_penalize_isa_irq(int irq, int active) {} |
15 | #endif /* CONFIG_PCI */ | 15 | #endif /* CONFIG_PCI */ |
16 | 16 | ||
17 | #include "pnpbios.h" | 17 | #include "pnpbios.h" |