From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org,
"Maciej W. Rozycki" <macro@linux-mips.org>,
linux-mips@linux-mips.org
Subject: Re: [PATCH v2] IDE: Fix platform device registration in Swarm IDE driver
Date: Mon, 29 Sep 2008 01:51:30 +0400 [thread overview]
Message-ID: <48DFFC62.9050300@ru.mvista.com> (raw)
In-Reply-To: <20080928175450.GA8478@linux-mips.org>
Hello.
Ralf Baechle wrote:
> The Swarm IDE driver uses a release method which is defined in the driver
> itself thus potentially oopsable. The simple fix would be to just leak
> the device but this patch goes the full length and moves the entire
> handling of the platform device in the platform code and retains only
> the platform driver code in drivers/ide/mips/swarm.c.
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Index: linux-mips/arch/mips/sibyte/swarm/platform.c
> ===================================================================
> --- /dev/null
> +++ linux-mips/arch/mips/sibyte/swarm/platform.c
> @@ -0,0 +1,81 @@
> +#include <linux/err.h>
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +#include <linux/ata_platform.h>
> +
> +#include <asm/sibyte/board.h>
> +#include <asm/sibyte/sb1250_genbus.h>
> +#include <asm/sibyte/sb1250_regs.h>
> +
> +#define DRV_NAME "pata-swarm"
>
Hm, what driver? This is just a platform code. :-)
> +
> +#define SWARM_IDE_SHIFT 5
> +#define SWARM_IDE_BASE 0x1f0
> +#define SWARM_IDE_CTRL 0x3f6
> +
> +static struct resource swarm_pata_resource[] = {
> + {
> + .name = "Swarm GenBus IDE",
> + .flags = IORESOURCE_MEM,
> + }, {
> + .name = "Swarm GenBus IDE",
> + .flags = IORESOURCE_MEM,
> + }, {
> + .name = "Swarm GenBus IDE",
> + .flags = IORESOURCE_IRQ,
> + .start = K_INT_GB_IDE,
> + .end = K_INT_GB_IDE,
>
Giving the resources similar names is pointless. You can just leave
the 'name' field uninitialized.
MBR, Sergei
next prev parent reply other threads:[~2008-09-28 21:51 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
2008-09-28 13:12 ` Sergei Shtylyov
2008-09-28 17:54 ` [PATCH v2] " Ralf Baechle
2008-09-28 21:51 ` Sergei Shtylyov [this message]
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=48DFFC62.9050300@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.