aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-05-18 11:06:31 -0400
committerJiri Kosina <jkosina@suse.cz>2011-05-18 11:06:49 -0400
commit6b7b8e488bbdedeccabdd001a78ffcbe43bb8a3a (patch)
treef2f77cc31b4548745778fca6a51b09e1d8a49804 /drivers/pnp
parentb50f315cbb865079a16a12fd9ae6083f98fd592c (diff)
parentc1d10d18c542278b7fbc413c289d3cb6219da6b3 (diff)
Merge branch 'master' into upstream.
This is sync with Linus' tree to receive KEY_IMAGES definition that went in through input tree.
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/base.h2
-rw-r--r--drivers/pnp/card.c4
-rw-r--r--drivers/pnp/manager.c7
-rw-r--r--drivers/pnp/pnpbios/bioscalls.c2
-rw-r--r--drivers/pnp/resource.c7
5 files changed, 13 insertions, 9 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index 19bc73695475..fa4e0a5db3f8 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -142,7 +142,9 @@ void __pnp_remove_device(struct pnp_dev *dev);
142int pnp_check_port(struct pnp_dev *dev, struct resource *res); 142int pnp_check_port(struct pnp_dev *dev, struct resource *res);
143int pnp_check_mem(struct pnp_dev *dev, struct resource *res); 143int pnp_check_mem(struct pnp_dev *dev, struct resource *res);
144int pnp_check_irq(struct pnp_dev *dev, struct resource *res); 144int pnp_check_irq(struct pnp_dev *dev, struct resource *res);
145#ifdef CONFIG_ISA_DMA_API
145int pnp_check_dma(struct pnp_dev *dev, struct resource *res); 146int pnp_check_dma(struct pnp_dev *dev, struct resource *res);
147#endif
146 148
147char *pnp_resource_type_name(struct resource *res); 149char *pnp_resource_type_name(struct resource *res);
148void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); 150void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index 4a651f69e17c..bc00693d0c79 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -320,7 +320,7 @@ void pnp_remove_card_device(struct pnp_dev *dev)
320 * pnp_request_card_device - Searches for a PnP device under the specified card 320 * pnp_request_card_device - Searches for a PnP device under the specified card
321 * @clink: pointer to the card link, cannot be NULL 321 * @clink: pointer to the card link, cannot be NULL
322 * @id: pointer to a PnP ID structure that explains the rules for finding the device 322 * @id: pointer to a PnP ID structure that explains the rules for finding the device
323 * @from: Starting place to search from. If NULL it will start from the begining. 323 * @from: Starting place to search from. If NULL it will start from the beginning.
324 */ 324 */
325struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, 325struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
326 const char *id, struct pnp_dev *from) 326 const char *id, struct pnp_dev *from)
@@ -369,7 +369,7 @@ err_out:
369 369
370/** 370/**
371 * pnp_release_card_device - call this when the driver no longer needs the device 371 * pnp_release_card_device - call this when the driver no longer needs the device
372 * @dev: pointer to the PnP device stucture 372 * @dev: pointer to the PnP device structure
373 */ 373 */
374void pnp_release_card_device(struct pnp_dev *dev) 374void pnp_release_card_device(struct pnp_dev *dev)
375{ 375{
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 0a15664eef1c..ed9ce507149a 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -171,6 +171,7 @@ __add:
171 return 0; 171 return 0;
172} 172}
173 173
174#ifdef CONFIG_ISA_DMA_API
174static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) 175static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
175{ 176{
176 struct resource *res, local_res; 177 struct resource *res, local_res;
@@ -210,6 +211,7 @@ __add:
210 pnp_add_dma_resource(dev, res->start, res->flags); 211 pnp_add_dma_resource(dev, res->start, res->flags);
211 return 0; 212 return 0;
212} 213}
214#endif /* CONFIG_ISA_DMA_API */
213 215
214void pnp_init_resources(struct pnp_dev *dev) 216void pnp_init_resources(struct pnp_dev *dev)
215{ 217{
@@ -234,7 +236,8 @@ static void pnp_clean_resource_table(struct pnp_dev *dev)
234static int pnp_assign_resources(struct pnp_dev *dev, int set) 236static int pnp_assign_resources(struct pnp_dev *dev, int set)
235{ 237{
236 struct pnp_option *option; 238 struct pnp_option *option;
237 int nport = 0, nmem = 0, nirq = 0, ndma = 0; 239 int nport = 0, nmem = 0, nirq = 0;
240 int ndma __maybe_unused = 0;
238 int ret = 0; 241 int ret = 0;
239 242
240 pnp_dbg(&dev->dev, "pnp_assign_resources, try dependent set %d\n", set); 243 pnp_dbg(&dev->dev, "pnp_assign_resources, try dependent set %d\n", set);
@@ -256,9 +259,11 @@ static int pnp_assign_resources(struct pnp_dev *dev, int set)
256 case IORESOURCE_IRQ: 259 case IORESOURCE_IRQ:
257 ret = pnp_assign_irq(dev, &option->u.irq, nirq++); 260 ret = pnp_assign_irq(dev, &option->u.irq, nirq++);
258 break; 261 break;
262#ifdef CONFIG_ISA_DMA_API
259 case IORESOURCE_DMA: 263 case IORESOURCE_DMA:
260 ret = pnp_assign_dma(dev, &option->u.dma, ndma++); 264 ret = pnp_assign_dma(dev, &option->u.dma, ndma++);
261 break; 265 break;
266#endif
262 default: 267 default:
263 ret = -EINVAL; 268 ret = -EINVAL;
264 break; 269 break;
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
index 8591f6ab1b35..b859d16cf78c 100644
--- a/drivers/pnp/pnpbios/bioscalls.c
+++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -219,7 +219,7 @@ void pnpbios_print_status(const char *module, u16 status)
219 module); 219 module);
220 break; 220 break;
221 case PNP_HARDWARE_ERROR: 221 case PNP_HARDWARE_ERROR:
222 printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occured\n", 222 printk(KERN_ERR "PnPBIOS: %s: a hardware failure has occurred\n",
223 module); 223 module);
224 break; 224 break;
225 default: 225 default:
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index a925e6b63d72..b0ecacbe53b1 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -409,9 +409,9 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
409 return 1; 409 return 1;
410} 410}
411 411
412#ifdef CONFIG_ISA_DMA_API
412int pnp_check_dma(struct pnp_dev *dev, struct resource *res) 413int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
413{ 414{
414#ifndef CONFIG_IA64
415 int i; 415 int i;
416 struct pnp_dev *tdev; 416 struct pnp_dev *tdev;
417 struct resource *tres; 417 struct resource *tres;
@@ -466,11 +466,8 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
466 } 466 }
467 467
468 return 1; 468 return 1;
469#else
470 /* IA64 does not have legacy DMA */
471 return 0;
472#endif
473} 469}
470#endif /* CONFIG_ISA_DMA_API */
474 471
475unsigned long pnp_resource_type(struct resource *res) 472unsigned long pnp_resource_type(struct resource *res)
476{ 473{