Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-07-07 Thread Alexander Holler
Am 06.07.2013 20:21, schrieb Jiri Kosina: > On Sat, 6 Jul 2013, Alexander Holler wrote: > >> I've now traced down why the above patch _really_ is needed: it's because of >> how the locking is done in the hid-subsystem. So my intuition to use a work >> was ok, but my assumption that it's because th

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-07-06 Thread Jiri Kosina
On Sat, 6 Jul 2013, Alexander Holler wrote: > I've now traced down why the above patch _really_ is needed: it's because of > how the locking is done in the hid-subsystem. So my intuition to use a work > was ok, but my assumption that it's because the HID device driver wasn't > registered before pr

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-07-06 Thread Alexander Holler
Am 27.06.2013 01:51, schrieb Alexander Holler: Am 27.06.2013 00:07, schrieb Greg KH: On Wed, Jun 26, 2013 at 11:34:35PM +0200, Alexander Holler wrote: + /* +* The HID device has to be registered to read the clock. +* Because rtc_device_register() might read the time, we ha

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-27 Thread Alexander Holler
Am 26.06.2013 23:34, schrieb Alexander Holler: Am 26.06.2013 21:55, schrieb Andrew Morton: On Thu, 20 Jun 2013 12:39:36 +0200 Alexander Holler wrote: +static void hid_time_register_rtc_work(struct work_struct *work) +{ + struct hid_time_state *time_state = + container_of

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-26 Thread Alexander Holler
Am 27.06.2013 00:07, schrieb Greg KH: > On Wed, Jun 26, 2013 at 11:34:35PM +0200, Alexander Holler wrote: + /* + * The HID device has to be registered to read the clock. + * Because rtc_device_register() might read the time, we have to delay + * rtc_device_register() to a

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-26 Thread Greg KH
On Wed, Jun 26, 2013 at 11:34:35PM +0200, Alexander Holler wrote: > >> + /* > >> + * The HID device has to be registered to read the clock. > >> + * Because rtc_device_register() might read the time, we have to delay > >> + * rtc_device_register() to a work in order to finish the probe befor

Re: [rtc-linux] Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-26 Thread Alexander Holler
Am 26.06.2013 21:55, schrieb Andrew Morton: > On Thu, 20 Jun 2013 12:39:36 +0200 Alexander Holler > wrote: > >> rtc_device_register() might want to read the clock which doesn't work >> before the hid device is registered. Therefor we delay the registration of >> the rtc driver by moving it to a

Re: [PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-26 Thread Andrew Morton
On Thu, 20 Jun 2013 12:39:36 +0200 Alexander Holler wrote: > rtc_device_register() might want to read the clock which doesn't work > before the hid device is registered. Therefor we delay the registration of > the rtc driver by moving it to a work. > > --- a/drivers/rtc/rtc-hid-sensor-time.c

[PATCH 3/9 v2] rtc: rtc-hid-sensor-time: delay registering as rtc into a work

2013-06-20 Thread Alexander Holler
rtc_device_register() might want to read the clock which doesn't work before the hid device is registered. Therefor we delay the registration of the rtc driver by moving it to a work. Signed-off-by: Alexander Holler --- Changes to v1: I've fixed a bug calling rtc_device_unregister() in remove