linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	linux-ide@vger.kernel.org,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] IDE: Fix platform device registration in Swarm IDE driver
Date: Sun, 28 Sep 2008 12:39:31 +0100	[thread overview]
Message-ID: <20080928113931.GA9207@linux-mips.org> (raw)
In-Reply-To: <200809271859.55304.bzolnier@gmail.com>

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

  parent reply	other threads:[~2008-09-28 11:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 12:29 [PATCH] IDE: Fix platform device registration in Swarm IDE driver Ralf Baechle
2008-09-24 11:08 ` Sergei Shtylyov
2008-09-24 13:52   ` Maciej W. Rozycki
2008-09-27 23:51     ` Ralf Baechle
2008-09-27 16:59   ` Bartlomiej Zolnierkiewicz
2008-09-28  9:22     ` Sergei Shtylyov
2008-09-28 11:39     ` Ralf Baechle [this message]
2008-09-28 13:12       ` Sergei Shtylyov
2008-09-28 17:54       ` [PATCH v2] " Ralf Baechle
2008-09-28 21:51         ` Sergei Shtylyov
2008-09-28 21:57           ` Ralf Baechle
2008-09-29  8:00           ` Sergei Shtylyov
2008-10-03 17:00           ` Bartlomiej Zolnierkiewicz
2008-10-03 18:25             ` Ralf Baechle
2008-09-28 11:47   ` [PATCH] " Ralf Baechle
2008-09-28 12:51     ` Sergei Shtylyov
2008-09-28 17:18       ` Geert Uytterhoeven

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=20080928113931.GA9207@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).