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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux