[Tinyx-devel] [PATCH 02/33] Revert "device subsystem: fix pointer function calls and add helpers fu
Status: Planning
Brought to you by:
davidcohen
From: Felipe B. <me...@fe...> - 2007-12-12 16:46:42
|
This reverts commit a3199b2eb141c22fdc21b5c0bc94f5808e30dfd7. --- include/tinyx/device.h | 5 ----- kernel/device.c | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/tinyx/device.h b/include/tinyx/device.h index 96417af..2916925 100644 --- a/include/tinyx/device.h +++ b/include/tinyx/device.h @@ -67,11 +67,6 @@ struct device { struct resource *res; }; -#define device_set_drvdata(dev, data) \ - (dev)->private_data = data -#define device_get_drvdata(dev) \ - (dev)->private_data - int register_bus_type(struct bus_type *bus); int register_device_driver(struct device_driver *drv); int register_device(struct device *dev, struct bus_type *bus); diff --git a/kernel/device.c b/kernel/device.c index 2f01ee4..a7baeb1 100644 --- a/kernel/device.c +++ b/kernel/device.c @@ -44,7 +44,7 @@ int register_bus_type(struct bus_type *bus) return -ENODEV; if (bus->probe) - ret = (*bus->probe)(bus); + ret = bus->probe(bus); if (!ret) list_add_tail(&bus_list, &bus->queue); @@ -62,9 +62,9 @@ int register_device_driver(struct device_driver *drv) dev = match_device_driver(NULL, drv); if (dev) { if (dev->bus->match) - ret = (*dev->bus->match)(dev->bus, dev, drv); + ret = dev->bus->match(dev->bus, dev, drv); if (!ret && drv->probe) - ret = (*drv->probe)(dev); + ret = drv->probe(dev); } if (!ret) @@ -85,9 +85,9 @@ int register_device(struct device *dev, struct bus_type *bus) drv = match_device_driver(dev, NULL); if (drv) { if (bus->match) - ret = (*bus->match)(bus, dev, drv); + ret = bus->match(bus, dev, drv); if (!ret && drv->probe) - ret = (*drv->probe)(dev); + ret = drv->probe(dev); } if (!ret) -- 1.5.3.7.1157.gbf82a |