| To: | Sergei Shtylyov <sshtylyov@ru.mvista.com> |
|---|---|
| Subject: | Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Sun, 28 Sep 2008 12:47:11 +0100 |
| Cc: | bzolnier@gmail.com, linux-ide@vger.kernel.org, "Maciej W. Rozycki" <macro@linux-mips.org>, linux-mips@linux-mips.org |
| In-reply-to: | <48DA1F9D.6000501@ru.mvista.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20080922122853.GA15210@linux-mips.org> <48DA1F9D.6000501@ru.mvista.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Wed, Sep 24, 2008 at 03:08:13PM +0400, Sergei Shtylyov wrote:
>> +{
>>
> [...]
>> + pdev = platform_device_register_simple(DEV_NAME, -1,
>> + swarm_ide_resource, ARRAY_SIZE(swarm_ide_resource));
>>
>
> If you have the resources as static array anyway, why not have the
> device in the static variable too and use platform_device_register()?
It saves a few lines of code.
>> -static struct platform_device *swarm_ide_dev;
>>
>
> Platform device in the driver itself? Interesting... :-)
It works and isn't a too bad idea for certain drivers where adding one half
of the code to a platform file, another to the driver file is just too
much fuzz. It's just that this wasn't done right in case of the Swarm so
I'm gluing that now.
Ralf
|
| Previous by Date: | Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver, Ralf Baechle |
|---|---|
| Next by Date: | Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver, Sergei Shtylyov |
| Previous by Thread: | Re: [PATCH v2] IDE: Fix platform device registration in Swarm IDE driver, Sergei Shtylyov |
| Next by Thread: | Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver, Sergei Shtylyov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |