[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <F3D1520B-B37D-4DF8-9482-DE6D1A708F75@gmail.com>
Date: Wed, 4 Oct 2006 21:25:43 +0900
From: girish <girishvg@...il.com>
To: Paul Mundt <lethal@...ux-sh.org>
Cc: B.Zolnierkiewicz@...a.pw.edu.pl, linux-kernel@...r.kernel.org,
linux-ide@...r.kernel.org, rmk@....linux.org.uk, gregkh@...e.de,
ysato@...rs.sourceforge.jp
Subject: Re: [PATCH] Generic platform device IDE driver
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;
+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists