12 #include <linux/kernel.h>
13 #include <linux/device.h>
15 #include <linux/module.h>
16 #include <linux/types.h>
17 #include <linux/list.h>
19 #include <linux/string.h>
20 #include <linux/slab.h>
22 static int superhyway_devices;
24 static struct device superhyway_bus_device = {
25 .init_name =
"superhyway",
28 static void superhyway_device_release(
struct device *
dev)
66 superhyway_read_vcr(dev, base, &dev->
vcr);
80 dev->
dev.parent = &superhyway_bus_device;
82 dev->
dev.release = superhyway_device_release;
83 dev->
id.id = dev->
vcr.mod_id;
99 for (i = 0; i < nr_devices; i++) {
107 static int __init superhyway_init(
void)
128 if (ids->
id == dev->
id.id)
137 static int superhyway_device_probe(
struct device *dev)
142 if (shyway_drv && shyway_drv->
probe) {
145 id = superhyway_match_id(shyway_drv->
id_table, shyway_dev);
147 return shyway_drv->
probe(shyway_dev,
id);
153 static int superhyway_device_remove(
struct device *dev)
158 if (shyway_drv && shyway_drv->
remove) {
159 shyway_drv->
remove(shyway_dev);
202 if (superhyway_match_id(ids, shyway_dev))
209 .name =
"superhyway",
210 .match = superhyway_bus_match,
214 .probe = superhyway_device_probe,
215 .remove = superhyway_device_remove,
218 static int __init superhyway_bus_init(
void)
223 static void __exit superhyway_bus_exit(
void)