]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/isa.h
isa: Implement the max_num_isa_dev macro
[mirror_ubuntu-artful-kernel.git] / include / linux / isa.h
index e394917d18c2ecac37d2b1177102909f47909aa1..5ab85281230b9dd688a3cad78217a42e932ab746 100644 (file)
@@ -57,4 +57,15 @@ static void __exit __isa_driver##_exit(void) \
 } \
 module_exit(__isa_driver##_exit);
 
+/**
+ * max_num_isa_dev() - Maximum possible number registered of an ISA device
+ * @__ida_dev_ext: ISA device address extent
+ *
+ * The highest base address possible for an ISA device is 0x3FF; this results in
+ * 1024 possible base addresses. Dividing the number of possible base addresses
+ * by the address extent taken by each device results in the maximum number of
+ * devices on a system.
+ */
+#define max_num_isa_dev(__isa_dev_ext) (1024 / __isa_dev_ext)
+
 #endif /* __LINUX_ISA_H */