Re: [PATCH 4/4] powerpc: Add uevent handler for ibmebus
From: Sylvain Munaut <hidden>
Date: 2006-12-18 23:10:55
From: Sylvain Munaut <hidden>
Date: 2006-12-18 23:10:55
Arnd Bergmann wrote:
On Monday 18 December 2006 23:46, Sylvain Munaut wrote:quoted
+ 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 <><
Right, damn I missed that. Not too used to the whole "to_..." stuff.
I'll wait a little in case someone has other comments, and I'll resubmit
in a single patch (unless you really want me to separate in 4 patch, 2
of those
being one liners ...)
Sylvain