Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] compat: add __cancel_delayed_work()
@ 2012-01-21 13:44 Hauke Mehrtens
  2012-01-23 17:31 ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Hauke Mehrtens @ 2012-01-21 13:44 UTC (permalink / raw)
  To: mcgrof, mcgrof; +Cc: linux-wireless, Hauke Mehrtens

__cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
not available in old kernel versions. This was just copied from the
kernel.

This should also go into compat-wireless-stable-3.3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.31.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.31.h b/include/linux/compat-2.6.31.h
index 25db973..a1244cb 100644
--- a/include/linux/compat-2.6.31.h
+++ b/include/linux/compat-2.6.31.h
@@ -215,6 +215,20 @@ extern long long atomic64_add_return(long long a, atomic64_t *v);
 
 #endif
 
+/*
+ * Like above, but uses del_timer() instead of del_timer_sync(). This means,
+ * if it returns 0 the timer function may be running and the queueing is in
+ * progress.
+ */
+static inline bool __cancel_delayed_work(struct delayed_work *work)
+{
+	bool ret;
+
+	ret = del_timer(&work->timer);
+	if (ret)
+		work_clear_pending(&work->work);
+	return ret;
+}
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-21 13:44 [PATCH] compat: add __cancel_delayed_work() Hauke Mehrtens
@ 2012-01-23 17:31 ` Luis R. Rodriguez
  2012-01-23 17:55   ` Andreas Hartmann
  2012-02-01 19:14   ` Hauke Mehrtens
  0 siblings, 2 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-01-23 17:31 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless

On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
> not available in old kernel versions. This was just copied from the
> kernel.
>
> This should also go into compat-wireless-stable-3.3.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Thanks! Applied all onto compat-wireless.git and compat.git, in
addition to the linux-3.3.y branch for compat.git as you indicated for
this patch. Will roll out a new tarball right away.

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 17:31 ` Luis R. Rodriguez
@ 2012-01-23 17:55   ` Andreas Hartmann
  2012-01-23 17:57     ` Luis R. Rodriguez
  2012-02-01 19:14   ` Hauke Mehrtens
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Hartmann @ 2012-01-23 17:55 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Hauke Mehrtens, linux-wireless

Luis R. Rodriguez schrieb:
> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>> not available in old kernel versions. This was just copied from the
>> kernel.
>>
>> This should also go into compat-wireless-stable-3.3.
>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> 
> Thanks! Applied all onto compat-wireless.git and compat.git, in
> addition to the linux-3.3.y branch for compat.git as you indicated for
> this patch. Will roll out a new tarball right away.

BTW: I've to apply always the following patch to some older
compat-wireless packages (3.2 e.g) to get it compiled with kernel 3.1:

--- drivers/misc/eeprom/Makefile.orig	2012-01-10 02:10:51.000000000 +0100
+++ drivers/misc/eeprom/Makefile	2012-01-10 05:14:40.082494612 +0100
@@ -1,3 +1,3 @@
 obj-$(CONFIG_EEPROM_93CX6)	+= eeprom_93cx6.o
-obj-$(CONFIG_EEPROM_93XX46)	+= eeprom_93xx46.o
+# obj-$(CONFIG_EEPROM_93XX46)	+= eeprom_93xx46.o
 obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o

Is this eventually needed in 3.3, too?


Thanks,
Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 17:55   ` Andreas Hartmann
@ 2012-01-23 17:57     ` Luis R. Rodriguez
  2012-01-23 18:01       ` Hauke Mehrtens
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-01-23 17:57 UTC (permalink / raw)
  To: Andreas Hartmann; +Cc: Hauke Mehrtens, linux-wireless

On Mon, Jan 23, 2012 at 9:55 AM, Andreas Hartmann
<andihartmann@01019freenet.de> wrote:
> Luis R. Rodriguez schrieb:
>> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>>> not available in old kernel versions. This was just copied from the
>>> kernel.
>>>
>>> This should also go into compat-wireless-stable-3.3.
>>>
>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>
>> Thanks! Applied all onto compat-wireless.git and compat.git, in
>> addition to the linux-3.3.y branch for compat.git as you indicated for
>> this patch. Will roll out a new tarball right away.
>
> BTW: I've to apply always the following patch to some older
> compat-wireless packages (3.2 e.g) to get it compiled with kernel 3.1:
>
> --- drivers/misc/eeprom/Makefile.orig   2012-01-10 02:10:51.000000000 +0100
> +++ drivers/misc/eeprom/Makefile        2012-01-10 05:14:40.082494612 +0100
> @@ -1,3 +1,3 @@
>  obj-$(CONFIG_EEPROM_93CX6)     += eeprom_93cx6.o
> -obj-$(CONFIG_EEPROM_93XX46)    += eeprom_93xx46.o
> +# obj-$(CONFIG_EEPROM_93XX46)  += eeprom_93xx46.o
>  obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
>
> Is this eventually needed in 3.3, too?

Why do you need this? Can you show your compile errors?

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 17:57     ` Luis R. Rodriguez
@ 2012-01-23 18:01       ` Hauke Mehrtens
  2012-01-23 18:23         ` Andreas Hartmann
  2012-01-23 18:26         ` Luis R. Rodriguez
  0 siblings, 2 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2012-01-23 18:01 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Andreas Hartmann, linux-wireless

On 01/23/2012 06:57 PM, Luis R. Rodriguez wrote:
> On Mon, Jan 23, 2012 at 9:55 AM, Andreas Hartmann
> <andihartmann@01019freenet.de> wrote:
>> Luis R. Rodriguez schrieb:
>>> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>>>> not available in old kernel versions. This was just copied from the
>>>> kernel.
>>>>
>>>> This should also go into compat-wireless-stable-3.3.
>>>>
>>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>>
>>> Thanks! Applied all onto compat-wireless.git and compat.git, in
>>> addition to the linux-3.3.y branch for compat.git as you indicated for
>>> this patch. Will roll out a new tarball right away.
>>
>> BTW: I've to apply always the following patch to some older
>> compat-wireless packages (3.2 e.g) to get it compiled with kernel 3.1:
>>
>> --- drivers/misc/eeprom/Makefile.orig   2012-01-10 02:10:51.000000000 +0100
>> +++ drivers/misc/eeprom/Makefile        2012-01-10 05:14:40.082494612 +0100
>> @@ -1,3 +1,3 @@
>>  obj-$(CONFIG_EEPROM_93CX6)     += eeprom_93cx6.o
>> -obj-$(CONFIG_EEPROM_93XX46)    += eeprom_93xx46.o
>> +# obj-$(CONFIG_EEPROM_93XX46)  += eeprom_93xx46.o
>>  obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
>>
>> Is this eventually needed in 3.3, too?
> 
> Why do you need this? Can you show your compile errors?
> 
>   Luis

This is fixed in HEAD in this commit:

commit 0db9fae8c40674f65cf50c78e6587b9c9d9e2735
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date:   Sat Dec 3 15:46:21 2011 +0100

    compat-wireless: remove some modules from Makefile

It should be backported to linux-3.1.y and linux-3.2.y. We just ship
eeprom_93cx6.c and nothing else in this directory.

Hauke

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 18:01       ` Hauke Mehrtens
@ 2012-01-23 18:23         ` Andreas Hartmann
  2012-01-23 18:26         ` Luis R. Rodriguez
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Hartmann @ 2012-01-23 18:23 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: Luis R. Rodriguez, linux-wireless

Hauke Mehrtens schrieb:
> On 01/23/2012 06:57 PM, Luis R. Rodriguez wrote:
>> On Mon, Jan 23, 2012 at 9:55 AM, Andreas Hartmann
>> <andihartmann@01019freenet.de> wrote:
>>> Luis R. Rodriguez schrieb:
>>>> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>>>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>>>>> not available in old kernel versions. This was just copied from the
>>>>> kernel.
>>>>>
>>>>> This should also go into compat-wireless-stable-3.3.
>>>>>
>>>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>>>
>>>> Thanks! Applied all onto compat-wireless.git and compat.git, in
>>>> addition to the linux-3.3.y branch for compat.git as you indicated for
>>>> this patch. Will roll out a new tarball right away.
>>>
>>> BTW: I've to apply always the following patch to some older
>>> compat-wireless packages (3.2 e.g) to get it compiled with kernel 3.1:
>>>
>>> --- drivers/misc/eeprom/Makefile.orig   2012-01-10 02:10:51.000000000 +0100
>>> +++ drivers/misc/eeprom/Makefile        2012-01-10 05:14:40.082494612 +0100
>>> @@ -1,3 +1,3 @@
>>>  obj-$(CONFIG_EEPROM_93CX6)     += eeprom_93cx6.o
>>> -obj-$(CONFIG_EEPROM_93XX46)    += eeprom_93xx46.o
>>> +# obj-$(CONFIG_EEPROM_93XX46)  += eeprom_93xx46.o
>>>  obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
>>>
>>> Is this eventually needed in 3.3, too?
>>
>> Why do you need this? Can you show your compile errors?
>>
>>   Luis
> 
> This is fixed in HEAD in this commit:
> 
> commit 0db9fae8c40674f65cf50c78e6587b9c9d9e2735
> Author: Hauke Mehrtens <hauke@hauke-m.de>
> Date:   Sat Dec 3 15:46:21 2011 +0100
> 
>     compat-wireless: remove some modules from Makefile
> 
> It should be backported to linux-3.1.y and linux-3.2.y. We just ship
> eeprom_93cx6.c and nothing else in this directory.


Thank you,
Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 18:01       ` Hauke Mehrtens
  2012-01-23 18:23         ` Andreas Hartmann
@ 2012-01-23 18:26         ` Luis R. Rodriguez
  1 sibling, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-01-23 18:26 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: Andreas Hartmann, linux-wireless

On Mon, Jan 23, 2012 at 10:01 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 01/23/2012 06:57 PM, Luis R. Rodriguez wrote:
>> On Mon, Jan 23, 2012 at 9:55 AM, Andreas Hartmann
>> <andihartmann@01019freenet.de> wrote:
>>> Luis R. Rodriguez schrieb:
>>>> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>>>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>>>>> not available in old kernel versions. This was just copied from the
>>>>> kernel.
>>>>>
>>>>> This should also go into compat-wireless-stable-3.3.
>>>>>
>>>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>>>
>>>> Thanks! Applied all onto compat-wireless.git and compat.git, in
>>>> addition to the linux-3.3.y branch for compat.git as you indicated for
>>>> this patch. Will roll out a new tarball right away.
>>>
>>> BTW: I've to apply always the following patch to some older
>>> compat-wireless packages (3.2 e.g) to get it compiled with kernel 3.1:
>>>
>>> --- drivers/misc/eeprom/Makefile.orig   2012-01-10 02:10:51.000000000 +0100
>>> +++ drivers/misc/eeprom/Makefile        2012-01-10 05:14:40.082494612 +0100
>>> @@ -1,3 +1,3 @@
>>>  obj-$(CONFIG_EEPROM_93CX6)     += eeprom_93cx6.o
>>> -obj-$(CONFIG_EEPROM_93XX46)    += eeprom_93xx46.o
>>> +# obj-$(CONFIG_EEPROM_93XX46)  += eeprom_93xx46.o
>>>  obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
>>>
>>> Is this eventually needed in 3.3, too?
>>
>> Why do you need this? Can you show your compile errors?
>>
>>   Luis
>
> This is fixed in HEAD in this commit:
>
> commit 0db9fae8c40674f65cf50c78e6587b9c9d9e2735
> Author: Hauke Mehrtens <hauke@hauke-m.de>
> Date:   Sat Dec 3 15:46:21 2011 +0100
>
>    compat-wireless: remove some modules from Makefile
>
> It should be backported to linux-3.1.y and linux-3.2.y. We just ship
> eeprom_93cx6.c and nothing else in this directory.

Thanks, I've applied this onto those branches and upon a new release
those will get the fixes.

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat: add __cancel_delayed_work()
  2012-01-23 17:31 ` Luis R. Rodriguez
  2012-01-23 17:55   ` Andreas Hartmann
@ 2012-02-01 19:14   ` Hauke Mehrtens
  1 sibling, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2012-02-01 19:14 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On 01/23/2012 06:31 PM, Luis R. Rodriguez wrote:
> On Sat, Jan 21, 2012 at 5:44 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> __cancel_delayed_work is needed by include/net/bluetooth/l2cap.h and
>> not available in old kernel versions. This was just copied from the
>> kernel.
>>
>> This should also go into compat-wireless-stable-3.3.
>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> 
> Thanks! Applied all onto compat-wireless.git and compat.git, in
> addition to the linux-3.3.y branch for compat.git as you indicated for
> this patch. Will roll out a new tarball right away.
> 
>   Luis

This patch is not in the master branch of compat, it is just in the
linux-3.3.y branch. Could you please add this to master.
It is commit ed1b6816e893ee7a158ecd30687970faf4facc21 in linux-3.3.y.

Hauke

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-01 19:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-21 13:44 [PATCH] compat: add __cancel_delayed_work() Hauke Mehrtens
2012-01-23 17:31 ` Luis R. Rodriguez
2012-01-23 17:55   ` Andreas Hartmann
2012-01-23 17:57     ` Luis R. Rodriguez
2012-01-23 18:01       ` Hauke Mehrtens
2012-01-23 18:23         ` Andreas Hartmann
2012-01-23 18:26         ` Luis R. Rodriguez
2012-02-01 19:14   ` Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox