diff options
-rw-r--r-- | drivers/pnp/base.h | 27 | ||||
-rw-r--r-- | include/linux/pnp.h | 36 |
2 files changed, 26 insertions, 37 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h index 9b7bb62c98b1..4fe7c58f57e9 100644 --- a/drivers/pnp/base.h +++ b/drivers/pnp/base.h | |||
@@ -1,12 +1,37 @@ | |||
1 | extern spinlock_t pnp_lock; | 1 | extern spinlock_t pnp_lock; |
2 | void *pnp_alloc(long size); | 2 | void *pnp_alloc(long size); |
3 | |||
4 | int pnp_register_protocol(struct pnp_protocol *protocol); | ||
5 | void pnp_unregister_protocol(struct pnp_protocol *protocol); | ||
6 | |||
3 | #define PNP_EISA_ID_MASK 0x7fffffff | 7 | #define PNP_EISA_ID_MASK 0x7fffffff |
4 | void pnp_eisa_id_to_string(u32 id, char *str); | 8 | void pnp_eisa_id_to_string(u32 id, char *str); |
5 | struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id, char *pnpid); | 9 | struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *, int id, char *pnpid); |
6 | struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid); | 10 | struct pnp_card *pnp_alloc_card(struct pnp_protocol *, int id, char *pnpid); |
11 | |||
12 | int pnp_add_device(struct pnp_dev *dev); | ||
7 | struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id); | 13 | struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id); |
8 | struct pnp_id *pnp_add_card_id(struct pnp_card *card, char *id); | ||
9 | int pnp_interface_attach_device(struct pnp_dev *dev); | 14 | int pnp_interface_attach_device(struct pnp_dev *dev); |
15 | |||
16 | int pnp_add_card(struct pnp_card *card); | ||
17 | struct pnp_id *pnp_add_card_id(struct pnp_card *card, char *id); | ||
18 | void pnp_remove_card(struct pnp_card *card); | ||
19 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); | ||
20 | void pnp_remove_card_device(struct pnp_dev *dev); | ||
21 | |||
22 | struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); | ||
23 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, | ||
24 | int priority); | ||
25 | int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
26 | struct pnp_irq *data); | ||
27 | int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
28 | struct pnp_dma *data); | ||
29 | int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
30 | struct pnp_port *data); | ||
31 | int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
32 | struct pnp_mem *data); | ||
33 | void pnp_init_resources(struct pnp_dev *dev); | ||
34 | |||
10 | void pnp_fixup_device(struct pnp_dev *dev); | 35 | void pnp_fixup_device(struct pnp_dev *dev); |
11 | void pnp_free_option(struct pnp_option *option); | 36 | void pnp_free_option(struct pnp_option *option); |
12 | int __pnp_add_device(struct pnp_dev *dev); | 37 | int __pnp_add_device(struct pnp_dev *dev); |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index a5487b6a4e57..f5b985e912ae 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -414,19 +414,12 @@ extern struct bus_type pnp_bus_type; | |||
414 | #if defined(CONFIG_PNP) | 414 | #if defined(CONFIG_PNP) |
415 | 415 | ||
416 | /* device management */ | 416 | /* device management */ |
417 | int pnp_register_protocol(struct pnp_protocol *protocol); | ||
418 | void pnp_unregister_protocol(struct pnp_protocol *protocol); | ||
419 | int pnp_add_device(struct pnp_dev *dev); | ||
420 | int pnp_device_attach(struct pnp_dev *pnp_dev); | 417 | int pnp_device_attach(struct pnp_dev *pnp_dev); |
421 | void pnp_device_detach(struct pnp_dev *pnp_dev); | 418 | void pnp_device_detach(struct pnp_dev *pnp_dev); |
422 | extern struct list_head pnp_global; | 419 | extern struct list_head pnp_global; |
423 | extern int pnp_platform_devices; | 420 | extern int pnp_platform_devices; |
424 | 421 | ||
425 | /* multidevice card support */ | 422 | /* multidevice card support */ |
426 | int pnp_add_card(struct pnp_card *card); | ||
427 | void pnp_remove_card(struct pnp_card *card); | ||
428 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); | ||
429 | void pnp_remove_card_device(struct pnp_dev *dev); | ||
430 | struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, | 423 | struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, |
431 | const char *id, struct pnp_dev *from); | 424 | const char *id, struct pnp_dev *from); |
432 | void pnp_release_card_device(struct pnp_dev *dev); | 425 | void pnp_release_card_device(struct pnp_dev *dev); |
@@ -435,20 +428,7 @@ void pnp_unregister_card_driver(struct pnp_card_driver *drv); | |||
435 | extern struct list_head pnp_cards; | 428 | extern struct list_head pnp_cards; |
436 | 429 | ||
437 | /* resource management */ | 430 | /* resource management */ |
438 | struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); | ||
439 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, | ||
440 | int priority); | ||
441 | int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
442 | struct pnp_irq *data); | ||
443 | int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
444 | struct pnp_dma *data); | ||
445 | int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
446 | struct pnp_port *data); | ||
447 | int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, | ||
448 | struct pnp_mem *data); | ||
449 | void pnp_init_resources(struct pnp_dev *dev); | ||
450 | int pnp_auto_config_dev(struct pnp_dev *dev); | 431 | int pnp_auto_config_dev(struct pnp_dev *dev); |
451 | int pnp_validate_config(struct pnp_dev *dev); | ||
452 | int pnp_start_dev(struct pnp_dev *dev); | 432 | int pnp_start_dev(struct pnp_dev *dev); |
453 | int pnp_stop_dev(struct pnp_dev *dev); | 433 | int pnp_stop_dev(struct pnp_dev *dev); |
454 | int pnp_activate_dev(struct pnp_dev *dev); | 434 | int pnp_activate_dev(struct pnp_dev *dev); |
@@ -463,35 +443,19 @@ void pnp_unregister_driver(struct pnp_driver *drv); | |||
463 | #else | 443 | #else |
464 | 444 | ||
465 | /* device management */ | 445 | /* device management */ |
466 | static inline int pnp_register_protocol(struct pnp_protocol *protocol) { return -ENODEV; } | ||
467 | static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) { } | ||
468 | static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; } | ||
469 | static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } | ||
470 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } | 446 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } |
471 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { } | 447 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { } |
472 | 448 | ||
473 | #define pnp_platform_devices 0 | 449 | #define pnp_platform_devices 0 |
474 | 450 | ||
475 | /* multidevice card support */ | 451 | /* multidevice card support */ |
476 | static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } | ||
477 | static inline void pnp_remove_card(struct pnp_card *card) { } | ||
478 | static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; } | ||
479 | static inline void pnp_remove_card_device(struct pnp_dev *dev) { } | ||
480 | static inline struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, const char *id, struct pnp_dev *from) { return NULL; } | 452 | static inline struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, const char *id, struct pnp_dev *from) { return NULL; } |
481 | static inline void pnp_release_card_device(struct pnp_dev *dev) { } | 453 | static inline void pnp_release_card_device(struct pnp_dev *dev) { } |
482 | static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; } | 454 | static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; } |
483 | static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv) { } | 455 | static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv) { } |
484 | 456 | ||
485 | /* resource management */ | 457 | /* resource management */ |
486 | static inline struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev) { return NULL; } | ||
487 | static inline struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; } | ||
488 | static inline int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; } | ||
489 | static inline int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; } | ||
490 | static inline int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_port *data) { return -ENODEV; } | ||
491 | static inline int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; } | ||
492 | static inline void pnp_init_resources(struct pnp_dev *dev) { } | ||
493 | static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; } | 458 | static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; } |
494 | static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; } | ||
495 | static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } | 459 | static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } |
496 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } | 460 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } |
497 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } | 461 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } |