5 #include <linux/device.h>
6 #include <linux/kernel.h>
7 #include <linux/slab.h>
8 #include <linux/module.h>
13 static struct device isa_bus = {
23 #define to_isa_dev(x) container_of((x), struct isa_dev, dev)
30 if (!isa_driver->
match ||
38 static int isa_bus_probe(
struct device *
dev)
42 if (isa_driver->
probe)
48 static int isa_bus_remove(
struct device *dev)
58 static void isa_bus_shutdown(
struct device *dev)
76 static int isa_bus_resume(
struct device *dev)
86 static struct bus_type isa_bus_type = {
88 .match = isa_bus_match,
89 .probe = isa_bus_probe,
90 .remove = isa_bus_remove,
91 .shutdown = isa_bus_shutdown,
92 .suspend = isa_bus_suspend,
93 .resume = isa_bus_resume
96 static void isa_dev_release(
struct device *dev)
119 isa_driver->
driver.bus = &isa_bus_type;
126 for (
id = 0;
id <
ndev;
id++) {
129 isa_dev = kzalloc(
sizeof *isa_dev,
GFP_KERNEL);
135 isa_dev->
dev.parent = &isa_bus;
136 isa_dev->
dev.bus = &isa_bus_type;
139 isa_driver->
driver.name,
id);
140 isa_dev->
dev.platform_data = isa_driver;
141 isa_dev->
dev.release = isa_dev_release;
145 isa_dev->
dev.dma_mask = &isa_dev->
dev.coherent_dma_mask;
153 if (isa_dev->
dev.platform_data) {
160 if (!error && !isa_driver->
devices)
170 static int __init isa_bus_init(
void)