public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt•com>
To: Arnd Bergmann <arnd@arndb•de>
Cc: Paul Mackerras <paulus@samba•org>,
	Linux PPC Devel <linuxppc-dev@ozlabs•org>
Subject: Re: [PATCH 4/4] powerpc: Add uevent handler for ibmebus
Date: Tue, 19 Dec 2006 00:09:11 +0100	[thread overview]
Message-ID: <45871F97.4010002@246tNt.com> (raw)
In-Reply-To: <200612190003.38713.arnd@arndb.de>

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

      reply	other threads:[~2006-12-18 23:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18 22:46 [PATCH 0/3] uevents handler for macio & of_platform Sylvain Munaut
2006-12-18 22:46 ` [PATCH 1/4] powerpc: Add a unified uevent handler for bus based on of_device Sylvain Munaut
2006-12-18 22:46   ` [PATCH 2/4] macintosh: Use the new of_device common uevent handler Sylvain Munaut
2006-12-18 22:46     ` [PATCH 3/4] powerpc: Add uevent handler for of_platform_bus Sylvain Munaut
2006-12-18 22:46       ` [PATCH 4/4] powerpc: Add uevent handler for ibmebus Sylvain Munaut
2006-12-18 23:03         ` Arnd Bergmann
2006-12-18 23:09           ` Sylvain Munaut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45871F97.4010002@246tNt.com \
    --to=tnt@246tnt$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox