Subject: Re: [PATCH 4/4] powerpc: Add uevent handler for ibmebus

From: Sylvain Munaut <[email-masked]>
Date: Tue, 19 Dec 2006 00:09:11 +0100

Arnd Bergmann wrote:
> 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 <><
>   
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