On Tue, Nov 30, 2004 at 06:35:18PM -0500, Edwin Olson wrote:
> Hi Greg, thanks for the feedback; I'll try to incorporate it soon.
>
> I do have a couple quick questions:
>
> - Should I just use diff -bB to avoid the whitespace changes I
> accidentally introduced?
No, just don't accidentally introduce them :)
> >>+static ssize_t show_event_char(struct device *dev, char *buf);
> >>+static ssize_t store_event_char(struct device *dev, const char *buf,
> >>size_t count);
> >>+static DEVICE_ATTR(event_char, S_IWUGO | S_IRUGO, show_event_char,
> >>store_event_char);
> >>
> >
> >
> >If you put these before where they are called, you don't need a forward
> >declaration at all, right?
> >
> >
> - Are forward declarations to be avoided when possible? (as a general rule)
I like to avoid them, but others do not. It's a personal preference, no
"general rule".
> - Should I, as a rule, always submit patches against the latest pre/rc?
Yes, whenever possible.
> And on a semi-unrelated subject, once I have all these snazzy
> attributes, I'd like to be able to access them given the udev name.
> Udevinfo can provide me with *a* sysfs path, which so far always seems
> to be in the /class/tty hierarchy. I can then map this path to a path in
> /device via libsysfs.
>
> Will udevinfo *always* provide me with a /class path, or do I need to be
> able to deal with whatever sysfs path udev gives me (ick!)?
You can work backwards from a /dev node to the sysfs /class path using
udevinfo:
udevinfo -n /dev/tts/USB0 -q all
P: /class/tty/ttyUSB0
N: tts/USB0
S:
From the "P:" line above, you can follow the "device" symlink in that
directory to get to the directory that you need, right?
Hope this helps,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel