Re: Platform device matching

From: Kenn Humborg
Date: Sun Apr 25 2004 - 18:37:24 EST


On Mon, Apr 26, 2004 at 12:27:33AM +0100, Russell King wrote:
> pdev->name is the platform device name, which is just the <name> part.
> pdev->dev.bus_id is the device model name, which is <name><instance-number>,
> and the devices are known by this name.
>
> Rather than going to the trouble of parsing <name> from the device model
> name which would be inherently buggy, we reference it directly from the
> platform_device structure.

OK - I see it now.

> So, this comment needs updating:
>
> * So, extract the <name> from the device, and compare it against
> * the name of the driver. Return whether they match or not.

Want a patch?

Later,
Kenn

--- drivers/base/platform.c~ 2004-01-12 23:49:04.000000000 +0000
+++ drivers/base/platform.c 2004-04-26 00:33:43.000000000 +0100
@@ -57,8 +57,9 @@
* type of device, like "pci" or "floppy", and <instance> is the
* enumerated instance of the device, like '0' or '42'.
* Driver IDs are simply "<name>".
- * So, extract the <name> from the device, and compare it against
- * the name of the driver. Return whether they match or not.
+ * So, extract the <name> from the platform_device structure,
+ * and compare it against the name of the driver. Return whether
+ * they match or not.
*/

static int platform_match(struct device * dev, struct device_driver * drv)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/