diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-26 15:06:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-30 12:18:27 +0200 |
commit | 73b0d228e5b00365e7289e9c258acb8de3f716b3 (patch) | |
tree | b17c82b3a4f33d52fdd26c52086e1fa7eaac97a3 /arch/sandbox | |
parent | 4a4f2f20b8873224983ab9b78173f9bc0564fa33 (diff) | |
download | barebox-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 'arch/sandbox')
-rw-r--r-- | arch/sandbox/board/hostfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c index 48c6ea35a8..ac29cfa47a 100644 --- a/arch/sandbox/board/hostfile.c +++ b/arch/sandbox/board/hostfile.c @@ -77,6 +77,9 @@ static int hf_probe(struct device_d *dev) priv->cdev.size = hf->size; priv->cdev.ops = &hf_fops; priv->cdev.priv = hf; + + dev->info = hf_info; + #ifdef CONFIG_FS_DEVFS devfs_create(&priv->cdev); #endif @@ -87,7 +90,6 @@ static int hf_probe(struct device_d *dev) static struct driver_d hf_drv = { .name = "hostfile", .probe = hf_probe, - .info = hf_info, }; device_platform_driver(hf_drv); @@ -111,4 +113,3 @@ int barebox_register_filedev(struct hf_platform_data *hf) return sandbox_add_device(dev); } - |