[PATCH 4/4] powerpc: Add uevent handler for ibmebus
Arnd Bergmann
arnd at arndb.de
Tue Dec 19 10:03:38 EST 2006
On Monday 18 December 2006 23:46, Sylvain Munaut wrote:
> + struct ibmebus_dev *ebus_dev;
> + struct of_device *of;
> +
> + if (!dev)
> + return -ENODEV;
> +
> + ebus_dev = to_ibmebus_dev(dev);
> + if (!ebus_dev)
> + return -ENODEV;
> +
> + of = &ebus_dev->ofdev;
This can be shortened to
of = to_of_device(dev);
With that code in place, this function is identical to those
for macio and of_platform_device, and you can collapse them
all into of_device_uevent.
Arnd <><
More information about the Linuxppc-dev
mailing list