From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
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 13:22:21 +0400 [thread overview]
Message-ID: <48DF4CCD.1070007@ru.mvista.com> (raw)
In-Reply-To: <200809271859.55304.bzolnier@gmail.com>
Hello.
Bartlomiej Zolnierkiewicz wrote:
>>> @@ -70,41 +59,18 @@ static const struct ide_port_info swarm_
>>> * swarm_ide_probe - if the board header indicates the existence of
>>> * Generic Bus IDE, allocate a HWIF for it.
>>> */
>>> -static int __devinit swarm_ide_probe(struct device *dev)
>>> +static int __devinit swarm_ide_probe(struct platform_device *pdev)
>>> {
>>> u8 __iomem *base;
>>> struct ide_host *host;
>>> phys_t offset, size;
>>> + struct resource *r;
>>> int i, rc;
>>> hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
>>>
>>> - if (!SIBYTE_HAVE_IDE)
>>> - return -ENODEV;
>>> -
>>> - base = ioremap(A_IO_EXT_BASE, 0x800);
>>> - offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
>>> - size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS));
>>> - iounmap(base);
>>> -
>>> - offset = G_IO_START_ADDR(offset) << S_IO_ADDRBASE;
>>> - size = (G_IO_MULT_SIZE(size) + 1) << S_IO_REGSIZE;
>>> - if (offset < A_PHYS_GENBUS || offset >= A_PHYS_GENBUS_END) {
>>> - printk(KERN_INFO DRV_NAME
>>> - ": IDE interface at GenBus disabled\n");
>>> - return -EBUSY;
>>> - }
>>> -
>>> - printk(KERN_INFO DRV_NAME ": IDE interface at GenBus slot %i\n",
>>> - IDE_CS);
>>> -
>>> - 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).
>
BTW, calling request_resource() seems pointless, as
platform_device_register() call will have called __request_resource()
already...
WBR, Sergei
next prev parent reply other threads:[~2008-09-28 9:22 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 [this message]
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
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=48DF4CCD.1070007@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 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).