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

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

 



On Sat, Sep 27, 2008 at 06:59:55PM +0200, Bartlomiej Zolnierkiewicz wrote:

> > > -	swarm_ide_resource.start = offset;
> > > -	swarm_ide_resource.end = offset + size - 1;
> > > -	if (request_resource(&iomem_resource, &swarm_ide_resource)) {
> > >   
> > 
> >    Why drop request_resource() completely? Replace it by 
> > request_mem_region().
> 
> Yes, this needs fixing (otherwise everything looks good).

No, platform_device_add which is called by platform_device_register*
will take care of adding the resources - but only if if's told about them
which the old driver didn't.

Also, in case of a resource conflict a device should not be added at all but
exactly that is what the old code did.  A resource conflict would have been
caught by the platform_driver probing code well too late.

> Ralf: I guess that your next step will be dropping swarm-specific platform ide
> driver in favor of generic one (please see drivers/ide/legacy/ide_platform.c)
> as they are _very_ similar now? :)

Good point - I was already wondering if something like that does exist.
What's left over of the swarm driver way too much looks like it can be
squeezed into some sort of template.

  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