aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-07-26 13:41:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 14:35:21 -0400
commit07d4e9af109221ab731c5aaf832e89776c64b013 (patch)
tree05d05620af7b1b009f48dbad5f38004b682db271 /include/linux
parent9dd78466c956ac4b4f38e12032dc4249ccf57ad1 (diff)
PNP: fix up after Lindent
These are manual fixups after running Lindent. No functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pnp.h238
-rw-r--r--include/linux/pnpbios.h10
2 files changed, 64 insertions, 184 deletions
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 6f9cf2fcffd0..16b46aace349 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -1,7 +1,6 @@
1/* 1/*
2 * Linux Plug and Play Support 2 * Linux Plug and Play Support
3 * Copyright by Adam Belay <ambx1@neo.rr.com> 3 * Copyright by Adam Belay <ambx1@neo.rr.com>
4 *
5 */ 4 */
6 5
7#ifndef _LINUX_PNP_H 6#ifndef _LINUX_PNP_H
@@ -83,7 +82,7 @@ struct pnp_port {
83 82
84#define PNP_IRQ_NR 256 83#define PNP_IRQ_NR 256
85struct pnp_irq { 84struct pnp_irq {
86 DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmaks for IRQ lines */ 85 DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmask for IRQ lines */
87 unsigned char flags; /* IRQ flags */ 86 unsigned char flags; /* IRQ flags */
88 unsigned char pad; /* pad */ 87 unsigned char pad; /* pad */
89 struct pnp_irq *next; /* next IRQ */ 88 struct pnp_irq *next; /* next IRQ */
@@ -112,10 +111,10 @@ struct pnp_mem {
112 111
113struct pnp_option { 112struct pnp_option {
114 unsigned short priority; /* priority */ 113 unsigned short priority; /* priority */
115 struct pnp_port *port; /* first port */ 114 struct pnp_port *port; /* first port */
116 struct pnp_irq *irq; /* first IRQ */ 115 struct pnp_irq *irq; /* first IRQ */
117 struct pnp_dma *dma; /* first DMA */ 116 struct pnp_dma *dma; /* first DMA */
118 struct pnp_mem *mem; /* first memory resource */ 117 struct pnp_mem *mem; /* first memory resource */
119 struct pnp_option *next; /* used to chain dependent resources */ 118 struct pnp_option *next; /* used to chain dependent resources */
120}; 119};
121 120
@@ -131,20 +130,20 @@ struct pnp_resource_table {
131 */ 130 */
132 131
133struct pnp_card { 132struct pnp_card {
134 struct device dev; /* Driver Model device interface */ 133 struct device dev; /* Driver Model device interface */
135 unsigned char number; /* used as an index, must be unique */ 134 unsigned char number; /* used as an index, must be unique */
136 struct list_head global_list; /* node in global list of cards */ 135 struct list_head global_list; /* node in global list of cards */
137 struct list_head protocol_list; /* node in protocol's list of cards */ 136 struct list_head protocol_list; /* node in protocol's list of cards */
138 struct list_head devices; /* devices attached to the card */ 137 struct list_head devices; /* devices attached to the card */
139 138
140 struct pnp_protocol *protocol; 139 struct pnp_protocol *protocol;
141 struct pnp_id *id; /* contains supported EISA IDs */ 140 struct pnp_id *id; /* contains supported EISA IDs */
142 141
143 char name[PNP_NAME_LEN]; /* contains a human-readable name */ 142 char name[PNP_NAME_LEN]; /* contains a human-readable name */
144 unsigned char pnpver; /* Plug & Play version */ 143 unsigned char pnpver; /* Plug & Play version */
145 unsigned char productver; /* product version */ 144 unsigned char productver; /* product version */
146 unsigned int serial; /* serial number */ 145 unsigned int serial; /* serial number */
147 unsigned char checksum; /* if zero - checksum passed */ 146 unsigned char checksum; /* if zero - checksum passed */
148 struct proc_dir_entry *procdir; /* directory entry in /proc/bus/isapnp */ 147 struct proc_dir_entry *procdir; /* directory entry in /proc/bus/isapnp */
149}; 148};
150 149
@@ -174,9 +173,9 @@ static inline void pnp_set_card_drvdata(struct pnp_card_link *pcard, void *data)
174} 173}
175 174
176struct pnp_dev { 175struct pnp_dev {
177 struct device dev; /* Driver Model device interface */ 176 struct device dev; /* Driver Model device interface */
178 u64 dma_mask; 177 u64 dma_mask;
179 unsigned char number; /* used as an index, must be unique */ 178 unsigned char number; /* used as an index, must be unique */
180 int status; 179 int status;
181 180
182 struct list_head global_list; /* node in global list of devices */ 181 struct list_head global_list; /* node in global list of devices */
@@ -189,7 +188,7 @@ struct pnp_dev {
189 struct pnp_driver *driver; 188 struct pnp_driver *driver;
190 struct pnp_card_link *card_link; 189 struct pnp_card_link *card_link;
191 190
192 struct pnp_id *id; /* supported EISA IDs */ 191 struct pnp_id *id; /* supported EISA IDs */
193 192
194 int active; 193 int active;
195 int capabilities; 194 int capabilities;
@@ -198,8 +197,8 @@ struct pnp_dev {
198 struct pnp_resource_table res; 197 struct pnp_resource_table res;
199 198
200 char name[PNP_NAME_LEN]; /* contains a human-readable name */ 199 char name[PNP_NAME_LEN]; /* contains a human-readable name */
201 unsigned short regs; /* ISAPnP: supported registers */ 200 unsigned short regs; /* ISAPnP: supported registers */
202 int flags; /* used by protocols */ 201 int flags; /* used by protocols */
203 struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */ 202 struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */
204 void *data; 203 void *data;
205}; 204};
@@ -291,11 +290,10 @@ struct pnp_driver {
291 char *name; 290 char *name;
292 const struct pnp_device_id *id_table; 291 const struct pnp_device_id *id_table;
293 unsigned int flags; 292 unsigned int flags;
294 int (*probe) (struct pnp_dev * dev, 293 int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
295 const struct pnp_device_id * dev_id); 294 void (*remove) (struct pnp_dev *dev);
296 void (*remove) (struct pnp_dev * dev); 295 int (*suspend) (struct pnp_dev *dev, pm_message_t state);
297 int (*suspend) (struct pnp_dev * dev, pm_message_t state); 296 int (*resume) (struct pnp_dev *dev);
298 int (*resume) (struct pnp_dev * dev);
299 struct device_driver driver; 297 struct device_driver driver;
300}; 298};
301 299
@@ -306,11 +304,11 @@ struct pnp_card_driver {
306 char *name; 304 char *name;
307 const struct pnp_card_device_id *id_table; 305 const struct pnp_card_device_id *id_table;
308 unsigned int flags; 306 unsigned int flags;
309 int (*probe) (struct pnp_card_link * card, 307 int (*probe) (struct pnp_card_link *card,
310 const struct pnp_card_device_id * card_id); 308 const struct pnp_card_device_id *card_id);
311 void (*remove) (struct pnp_card_link * card); 309 void (*remove) (struct pnp_card_link *card);
312 int (*suspend) (struct pnp_card_link * card, pm_message_t state); 310 int (*suspend) (struct pnp_card_link *card, pm_message_t state);
313 int (*resume) (struct pnp_card_link * card); 311 int (*resume) (struct pnp_card_link *card);
314 struct pnp_driver link; 312 struct pnp_driver link;
315}; 313};
316 314
@@ -329,9 +327,9 @@ struct pnp_protocol {
329 char *name; 327 char *name;
330 328
331 /* resource control functions */ 329 /* resource control functions */
332 int (*get) (struct pnp_dev * dev, struct pnp_resource_table * res); 330 int (*get) (struct pnp_dev *dev, struct pnp_resource_table *res);
333 int (*set) (struct pnp_dev * dev, struct pnp_resource_table * res); 331 int (*set) (struct pnp_dev *dev, struct pnp_resource_table *res);
334 int (*disable) (struct pnp_dev * dev); 332 int (*disable) (struct pnp_dev *dev);
335 333
336 /* protocol specific suspend/resume */ 334 /* protocol specific suspend/resume */
337 int (*suspend) (struct pnp_dev * dev, pm_message_t state); 335 int (*suspend) (struct pnp_dev * dev, pm_message_t state);
@@ -411,159 +409,49 @@ void pnp_unregister_driver(struct pnp_driver *drv);
411#else 409#else
412 410
413/* device management */ 411/* device management */
414static inline int pnp_register_protocol(struct pnp_protocol *protocol) 412static inline int pnp_register_protocol(struct pnp_protocol *protocol) { return -ENODEV; }
415{ 413static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) { }
416 return -ENODEV; 414static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; }
417} 415static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; }
418static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) 416static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; }
419{ 417static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { }
420}
421static inline int pnp_init_device(struct pnp_dev *dev)
422{
423 return -ENODEV;
424}
425static inline int pnp_add_device(struct pnp_dev *dev)
426{
427 return -ENODEV;
428}
429static inline int pnp_device_attach(struct pnp_dev *pnp_dev)
430{
431 return -ENODEV;
432}
433static inline void pnp_device_detach(struct pnp_dev *pnp_dev)
434{;
435}
436 418
437#define pnp_platform_devices 0 419#define pnp_platform_devices 0
438 420
439/* multidevice card support */ 421/* multidevice card support */
440static inline int pnp_add_card(struct pnp_card *card) 422static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; }
441{ 423static inline void pnp_remove_card(struct pnp_card *card) { }
442 return -ENODEV; 424static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; }
443} 425static inline void pnp_remove_card_device(struct pnp_dev *dev) { }
444static inline void pnp_remove_card(struct pnp_card *card) 426static inline int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card) { return -ENODEV; }
445{; 427static inline struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, const char *id, struct pnp_dev *from) { return NULL; }
446} 428static inline void pnp_release_card_device(struct pnp_dev *dev) { }
447static inline int pnp_add_card_device(struct pnp_card *card, 429static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; }
448 struct pnp_dev *dev) 430static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv) { }
449{
450 return -ENODEV;
451}
452static inline void pnp_remove_card_device(struct pnp_dev *dev)
453{;
454}
455static inline int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card)
456{
457 return -ENODEV;
458}
459static inline struct pnp_dev *pnp_request_card_device(struct pnp_card_link
460 *clink, const char *id,
461 struct pnp_dev *from)
462{
463 return NULL;
464}
465static inline void pnp_release_card_device(struct pnp_dev *dev)
466{;
467}
468static inline int pnp_register_card_driver(struct pnp_card_driver *drv)
469{
470 return -ENODEV;
471}
472static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv)
473{;
474}
475 431
476/* resource management */ 432/* resource management */
477static inline struct pnp_option *pnp_register_independent_option(struct pnp_dev 433static inline struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev) { return NULL; }
478 *dev) 434static inline struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; }
479{ 435static inline int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; }
480 return NULL; 436static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; }
481} 437static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
482static inline struct pnp_option *pnp_register_dependent_option(struct pnp_dev 438static inline int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
483 *dev, 439static inline void pnp_init_resource_table(struct pnp_resource_table *table) { }
484 int priority) 440static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
485{ 441static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }
486 return NULL; 442static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; }
487} 443static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
488static inline int pnp_register_irq_resource(struct pnp_option *option, 444static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
489 struct pnp_irq *data) 445static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
490{ 446static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
491 return -ENODEV; 447static inline void pnp_resource_change(struct resource *resource, resource_size_t start, resource_size_t size) { }
492}
493static inline int pnp_register_dma_resource(struct pnp_option *option,
494 struct pnp_dma *data)
495{
496 return -ENODEV;
497}
498static inline int pnp_register_port_resource(struct pnp_option *option,
499 struct pnp_port *data)
500{
501 return -ENODEV;
502}
503static inline int pnp_register_mem_resource(struct pnp_option *option,
504 struct pnp_mem *data)
505{
506 return -ENODEV;
507}
508static inline void pnp_init_resource_table(struct pnp_resource_table *table)
509{
510}
511static inline int pnp_manual_config_dev(struct pnp_dev *dev,
512 struct pnp_resource_table *res,
513 int mode)
514{
515 return -ENODEV;
516}
517static inline int pnp_auto_config_dev(struct pnp_dev *dev)
518{
519 return -ENODEV;
520}
521static inline int pnp_validate_config(struct pnp_dev *dev)
522{
523 return -ENODEV;
524}
525static inline int pnp_start_dev(struct pnp_dev *dev)
526{
527 return -ENODEV;
528}
529static inline int pnp_stop_dev(struct pnp_dev *dev)
530{
531 return -ENODEV;
532}
533static inline int pnp_activate_dev(struct pnp_dev *dev)
534{
535 return -ENODEV;
536}
537static inline int pnp_disable_dev(struct pnp_dev *dev)
538{
539 return -ENODEV;
540}
541static inline void pnp_resource_change(struct resource *resource,
542 resource_size_t start,
543 resource_size_t size)
544{
545}
546 448
547/* protocol helpers */ 449/* protocol helpers */
548static inline int pnp_is_active(struct pnp_dev *dev) 450static inline int pnp_is_active(struct pnp_dev *dev) { return 0; }
549{ 451static inline int compare_pnp_id(struct pnp_id *pos, const char *id) { return -ENODEV; }
550 return 0; 452static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
551} 453static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
552static inline int compare_pnp_id(struct pnp_id *pos, const char *id) 454static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
553{
554 return -ENODEV;
555}
556static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev)
557{
558 return -ENODEV;
559}
560static inline int pnp_register_driver(struct pnp_driver *drv)
561{
562 return -ENODEV;
563}
564static inline void pnp_unregister_driver(struct pnp_driver *drv)
565{;
566}
567 455
568#endif /* CONFIG_PNP */ 456#endif /* CONFIG_PNP */
569 457
diff --git a/include/linux/pnpbios.h b/include/linux/pnpbios.h
index 2e625d11a176..329192adc9dd 100644
--- a/include/linux/pnpbios.h
+++ b/include/linux/pnpbios.h
@@ -134,7 +134,7 @@ struct pnp_bios_node {
134extern struct pnp_dev_node_info node_info; 134extern struct pnp_dev_node_info node_info;
135 135
136extern int pnp_bios_dev_node_info(struct pnp_dev_node_info *data); 136extern int pnp_bios_dev_node_info(struct pnp_dev_node_info *data);
137extern int pnp_bios_get_dev_node(u8 * nodenum, char config, 137extern int pnp_bios_get_dev_node(u8 *nodenum, char config,
138 struct pnp_bios_node *data); 138 struct pnp_bios_node *data);
139extern int pnp_bios_set_dev_node(u8 nodenum, char config, 139extern int pnp_bios_set_dev_node(u8 nodenum, char config,
140 struct pnp_bios_node *data); 140 struct pnp_bios_node *data);
@@ -143,14 +143,6 @@ extern int pnp_bios_isapnp_config(struct pnp_isa_config_struc *data);
143extern int pnp_bios_escd_info(struct escd_info_struc *data); 143extern int pnp_bios_escd_info(struct escd_info_struc *data);
144extern int pnp_bios_read_escd(char *data, u32 nvram_base); 144extern int pnp_bios_read_escd(char *data, u32 nvram_base);
145extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); 145extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data);
146#define needed 0
147#if needed
148extern int pnp_bios_get_event(u16 * message);
149extern int pnp_bios_send_message(u16 message);
150extern int pnp_bios_set_stat_res(char *info);
151extern int pnp_bios_apm_id_table(char *table, u16 * size);
152extern int pnp_bios_write_escd(char *data, u32 nvram_base);
153#endif
154 146
155#endif /* CONFIG_PNPBIOS */ 147#endif /* CONFIG_PNPBIOS */
156 148