Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux