summaryrefslogtreecommitdiffstats
path: root/include/driver.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-26 15:06:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 12:18:27 +0200
commit73b0d228e5b00365e7289e9c258acb8de3f716b3 (patch)
treeb17c82b3a4f33d52fdd26c52086e1fa7eaac97a3 /include/driver.h
parent4a4f2f20b8873224983ab9b78173f9bc0564fa33 (diff)
downloadbarebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.gz
barebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.xz
driver: Attach info callback to device, not to driver
Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r--include/driver.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/driver.h b/include/driver.h
index 716f792afe..de195c5e5c 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -107,6 +107,8 @@ struct device_d {
struct device_node *device_node;
struct of_device_id *of_id_entry;
+
+ void (*info) (struct device_d *);
};
/** @brief Describes a driver present in the system */
@@ -124,9 +126,6 @@ struct driver_d {
/*! Called if an instance of a device is gone. */
void (*remove)(struct device_d *);
- void (*info) (struct device_d *);
- void (*shortinfo) (struct device_d *);
-
struct bus_type *bus;
struct platform_device_id *id_table;