On Fri, Dec 17, 2010 at 12:20:44AM +0100, Thomas Gleixner wrote:
Sorry, what do you mean?
I'm glad you suggested that.
IMHO, the CLOCK_DISPATCH thing is calling out to be eliminated, but I
didn't dare to take that upon myself.
;^)
...
The code in the patch set is modeled after a USB driver, namely
drivers/usb/class/usbtmc.c. Alan Cox had brought up the example of a
PTP Hardware Clock appearing as a USB device. So the device might
suddenly disappear, and the zombie field is supposed to cover the case
where the hardware no longer exists, but the file pointer is still
valid.
I'll take a closer look at your suggestion...
Yes, and hot pluggable, too.
I would summarize the discussion like this:
Alan Cox was strongly in favor of using a regular file descriptor as
the reference to the dynamic clock.
John Stultz thought it wouldn't be too bad to cycle though a number of
static ids, being careful not to every assign the same static id (in
series) to two different clocks.
I implemented Alan's idea, since it seemed like maintaining the
mapping between clocks and static ids would be extra work, but without
any real benefit.
Thanks again for your review,
Richard
--