From: girish <girishvg@gmail.com>
To: Paul Mundt <lethal@linux-sh.org>
Cc: B.Zolnierkiewicz@elka.pw.edu.pl, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org, rmk@arm.linux.org.uk, gregkh@suse.de,
ysato@users.sourceforge.jp
Subject: Re: [PATCH] Generic platform device IDE driver
Date: Wed, 4 Oct 2006 21:25:43 +0900 [thread overview]
Message-ID: <F3D1520B-B37D-4DF8-9482-DE6D1A708F75@gmail.com> (raw)
In-Reply-To: <20061004200214.GA6664@localhost.Internal.Linux-SH.ORG>
On Oct 5, 2006, at 5:02 AM, Paul Mundt wrote:
> On Wed, Oct 04, 2006 at 08:30:36PM +0900, girish wrote:
>> question: where is linux/ide-platform.h header?
>>
> answer: there isn't one, as it's not needed. The reason for using
> platform devices is so we get _away_ from this ridiculous static
> set of
> definitions for I/O addresses and IRQs that are sprinkled around a lot
> of these drivers.
i wrote wrong file name:
where is linux/platform_device.h file?
as per the patch :
+#include <linux/ide.h>
+#include <linux/platform_device.h>
+
+/*
+ * Users use per-port registration with a simple set of 3 resources
+ * per port:
+ * - I/O Base (IORESOURCE_IO)
+ * - CTL Base (IORESOURCE_IO)
+ * - IRQ (IORESOURCE_IRQ)
+ */
+static int __devinit ide_platform_probe(struct platform_device *dev)
+{
+ struct resource *io_res, *ctl_res;
+ hw_regs_t hw;
+
+ if (unlikely(dev->num_resources != 3)) {
+ dev_err(&dev->dev, "invalid number of resources\n");
+ return -EINVAL;
+ }
+
+ io_res = platform_get_resource(dev, IORESOURCE_IO, 0);
+ if (unlikely(io_res == NULL))
+ return -EINVAL;
+
next prev parent reply other threads:[~2006-10-04 12:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 7:45 Paul Mundt
2006-10-04 11:30 ` girish
2006-10-04 20:02 ` Paul Mundt
2006-10-04 12:25 ` girish [this message]
2006-10-04 11:41 ` Alan Cox
2006-10-04 20:05 ` Paul Mundt
2006-10-04 14:38 ` Alan Cox
2006-10-05 9:16 ` Paul Mundt
[not found] ` <200610111450.41909.matthias.fuchs@esd-electronics.com>
2006-10-12 6:13 ` Paul Mundt
2006-10-13 7:52 ` Russell King
2006-10-13 12:28 ` Paul Mundt
2006-10-13 12:46 ` Jeff Garzik
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=F3D1520B-B37D-4DF8-9482-DE6D1A708F75@gmail.com \
--to=girishvg@gmail.com \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=gregkh@suse.de \
--cc=lethal@linux-sh.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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
all inboxes | Powered by JetHome®