~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/isa.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/isa.h (Version linux-6.11-rc3) and /include/linux/isa.h (Version linux-4.11.12)


  1 /* SPDX-License-Identifier: GPL-2.0 */         << 
  2 /*                                                  1 /*
  3  * ISA bus.                                         2  * ISA bus.
  4  */                                                 3  */
  5                                                     4 
  6 #ifndef __LINUX_ISA_H                               5 #ifndef __LINUX_ISA_H
  7 #define __LINUX_ISA_H                               6 #define __LINUX_ISA_H
  8                                                     7 
  9 #include <linux/device.h>                           8 #include <linux/device.h>
 10 #include <linux/errno.h>                            9 #include <linux/errno.h>
 11 #include <linux/kernel.h>                          10 #include <linux/kernel.h>
 12                                                    11 
 13 struct isa_driver {                                12 struct isa_driver {
 14         int (*match)(struct device *, unsigned     13         int (*match)(struct device *, unsigned int);
 15         int (*probe)(struct device *, unsigned     14         int (*probe)(struct device *, unsigned int);
 16         void (*remove)(struct device *, unsign !!  15         int (*remove)(struct device *, unsigned int);
 17         void (*shutdown)(struct device *, unsi     16         void (*shutdown)(struct device *, unsigned int);
 18         int (*suspend)(struct device *, unsign     17         int (*suspend)(struct device *, unsigned int, pm_message_t);
 19         int (*resume)(struct device *, unsigne     18         int (*resume)(struct device *, unsigned int);
 20                                                    19 
 21         struct device_driver driver;               20         struct device_driver driver;
 22         struct device *devices;                    21         struct device *devices;
 23 };                                                 22 };
 24                                                    23 
 25 #define to_isa_driver(x) container_of((x), str     24 #define to_isa_driver(x) container_of((x), struct isa_driver, driver)
 26                                                    25 
 27 #ifdef CONFIG_ISA_BUS_API                          26 #ifdef CONFIG_ISA_BUS_API
 28 int isa_register_driver(struct isa_driver *, u     27 int isa_register_driver(struct isa_driver *, unsigned int);
 29 void isa_unregister_driver(struct isa_driver *     28 void isa_unregister_driver(struct isa_driver *);
 30 #else                                              29 #else
 31 static inline int isa_register_driver(struct i     30 static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
 32 {                                                  31 {
 33         return -ENODEV;                            32         return -ENODEV;
 34 }                                                  33 }
 35                                                    34 
 36 static inline void isa_unregister_driver(struc     35 static inline void isa_unregister_driver(struct isa_driver *d)
 37 {                                                  36 {
 38 }                                                  37 }
 39 #endif                                             38 #endif
 40                                                    39 
 41 #define module_isa_driver_init(__isa_driver, _ << 
 42 static int __init __isa_driver##_init(void) \  << 
 43 { \                                            << 
 44         return isa_register_driver(&(__isa_dri << 
 45 } \                                            << 
 46 module_init(__isa_driver##_init)               << 
 47                                                << 
 48 #define module_isa_driver_with_irq_init(__isa_ << 
 49 static int __init __isa_driver##_init(void) \  << 
 50 { \                                            << 
 51         if (__num_irq != __num_isa_dev) { \    << 
 52                 pr_err("%s: Number of irq (%u) << 
 53                        __isa_driver.driver.nam << 
 54                 return -EINVAL; \              << 
 55         } \                                    << 
 56         return isa_register_driver(&(__isa_dri << 
 57 } \                                            << 
 58 module_init(__isa_driver##_init)               << 
 59                                                << 
 60 #define module_isa_driver_exit(__isa_driver) \ << 
 61 static void __exit __isa_driver##_exit(void) \ << 
 62 { \                                            << 
 63         isa_unregister_driver(&(__isa_driver)) << 
 64 } \                                            << 
 65 module_exit(__isa_driver##_exit)               << 
 66                                                << 
 67 /**                                                40 /**
 68  * module_isa_driver() - Helper macro for regi     41  * module_isa_driver() - Helper macro for registering a ISA driver
 69  * @__isa_driver: isa_driver struct                42  * @__isa_driver: isa_driver struct
 70  * @__num_isa_dev: number of devices to regist     43  * @__num_isa_dev: number of devices to register
 71  *                                                 44  *
 72  * Helper macro for ISA drivers which do not d     45  * Helper macro for ISA drivers which do not do anything special in module
 73  * init/exit. This eliminates a lot of boilerp     46  * init/exit. This eliminates a lot of boilerplate code. Each module may only
 74  * use this macro once, and calling it replace     47  * use this macro once, and calling it replaces module_init and module_exit.
 75  */                                                48  */
 76 #define module_isa_driver(__isa_driver, __num_     49 #define module_isa_driver(__isa_driver, __num_isa_dev) \
 77 module_isa_driver_init(__isa_driver, __num_isa !!  50 static int __init __isa_driver##_init(void) \
 78 module_isa_driver_exit(__isa_driver)           !!  51 { \
 79                                                !!  52         return isa_register_driver(&(__isa_driver), __num_isa_dev); \
 80 /**                                            !!  53 } \
 81  * module_isa_driver_with_irq() - Helper macro !!  54 module_init(__isa_driver##_init); \
 82  * @__isa_driver: isa_driver struct            !!  55 static void __exit __isa_driver##_exit(void) \
 83  * @__num_isa_dev: number of devices to regist !!  56 { \
 84  * @__num_irq: number of IRQ to register       !!  57         isa_unregister_driver(&(__isa_driver)); \
 85  *                                             !!  58 } \
 86  * Helper macro for ISA drivers with irq that  !!  59 module_exit(__isa_driver##_exit);
 87  * module init/exit. Each module may only use  << 
 88  * replaces module_init and module_exit.       << 
 89  */                                            << 
 90 #define module_isa_driver_with_irq(__isa_drive << 
 91 module_isa_driver_with_irq_init(__isa_driver,  << 
 92 module_isa_driver_exit(__isa_driver)           << 
 93                                                    60 
 94 /**                                                61 /**
 95  * max_num_isa_dev() - Maximum possible number     62  * max_num_isa_dev() - Maximum possible number registered of an ISA device
 96  * @__ida_dev_ext: ISA device address extent       63  * @__ida_dev_ext: ISA device address extent
 97  *                                                 64  *
 98  * The highest base address possible for an IS     65  * The highest base address possible for an ISA device is 0x3FF; this results in
 99  * 1024 possible base addresses. Dividing the      66  * 1024 possible base addresses. Dividing the number of possible base addresses
100  * by the address extent taken by each device      67  * by the address extent taken by each device results in the maximum number of
101  * devices on a system.                            68  * devices on a system.
102  */                                                69  */
103 #define max_num_isa_dev(__isa_dev_ext) (1024 /     70 #define max_num_isa_dev(__isa_dev_ext) (1024 / __isa_dev_ext)
104                                                    71 
105 #endif /* __LINUX_ISA_H */                         72 #endif /* __LINUX_ISA_H */
106                                                    73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php