Re: [PATCH] driver core: Separate platform device name from platform device number

From: Kyle Moffett
Date: Fri Mar 25 2005 - 14:39:35 EST


On Mar 25, 2005, at 13:35, Paul Mundt wrote:
Anything that expects that it can open a /sys/devices/platform/<device><id>
path. I have a few applications like this, I have no reason to doubt that
others do too. I don't see any reason to go out of the way to break this
convention if the end of the device name is not a number.

So how would you tell the difference between the following?
device = "foobar0"
id = -1
path = "/sys/devices/platform/foobar0"
versus
device = "foobar"
id = 0
path = "/sys/devices/platform/foobar0"

I'll agree that having two drivers named like this is bad, but how is a
userspace application given a path like "/sys/devices/platform/foobar0"
supposed to figure out which one it is. It's not as nice to add the
extra period, but otherwise you end up with a lot of _extra_ special
cases in both the kernel _and_ applications, which helps nobody.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
------END GEEK CODE BLOCK------


-
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/