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 /drivers/net/cs8900.c | |
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 'drivers/net/cs8900.c')
-rw-r--r-- | drivers/net/cs8900.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index b0d045a4e9..aa9d9a0798 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -459,6 +459,8 @@ static int cs8900_probe(struct device_d *dev) edev->set_ethaddr = cs8900_set_ethaddr; edev->parent = dev; + dev->info = cs8900_info; + eth_register(edev); return 0; } @@ -466,6 +468,5 @@ static int cs8900_probe(struct device_d *dev) static struct driver_d cs8900_driver = { .name = "cs8900", .probe = cs8900_probe, - .info = cs8900_info, }; device_platform_driver(cs8900_driver); |