All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h
@ 2006-09-12 15:55 Matthias Fuchs
  2006-09-12 16:32 ` Wolfgang Grandegger
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Fuchs @ 2006-09-12 15:55 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka

Hi Jan,

I think there's is little typo in rtcan_dev.h:

Index: rtcan_dev.h
===================================================================
--- rtcan_dev.h (revision 1564)
+++ rtcan_dev.h (working copy)
@@ -45,7 +45,7 @@
 
 /* Suppress handling of refcount if module support is not enabled
  * or modules cannot be unloaded */
-#if defined(CONFIG_MODULES) && !defined(CONFIG_MODULE_UNLOAD)
+#if defined(CONFIG_MODULES) && defined(CONFIG_MODULE_UNLOAD)
 #define RTCAN_USE_REFCOUNT
 #endif


This simple patch will allow unloading of modules.

Matthias


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

* Re: [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h
  2006-09-12 15:55 [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h Matthias Fuchs
@ 2006-09-12 16:32 ` Wolfgang Grandegger
  2006-09-12 17:21   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Grandegger @ 2006-09-12 16:32 UTC (permalink / raw)
  To: Matthias Fuchs; +Cc: Jan Kiszka, xenomai

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

Matthias Fuchs wrote:
> Hi Jan,
> 
> I think there's is little typo in rtcan_dev.h:
> 
> Index: rtcan_dev.h
> ===================================================================
> --- rtcan_dev.h (revision 1564)
> +++ rtcan_dev.h (working copy)
> @@ -45,7 +45,7 @@
>  
>  /* Suppress handling of refcount if module support is not enabled
>   * or modules cannot be unloaded */
> -#if defined(CONFIG_MODULES) && !defined(CONFIG_MODULE_UNLOAD)
> +#if defined(CONFIG_MODULES) && defined(CONFIG_MODULE_UNLOAD)
>  #define RTCAN_USE_REFCOUNT
>  #endif
> 
> 
> This simple patch will allow unloading of modules.

Argh, I interpreted the meaning of CONFIG_MODULE_UNLOAD the other way 
round. But your fix will not work for 2.4, as there is no 
CONFIG_MODULE_UNLOAD. The attached one should be OK.

Thanks.

Wolfgang.

[-- Attachment #2: xenomai-can-refcount.patch --]
[-- Type: text/x-patch, Size: 587 bytes --]

+ diff -u xenomai/ksrc/drivers/can/rtcan_dev.h.REFCOUNT xenomai/ksrc/drivers/can/rtcan_dev.h
--- xenomai/ksrc/drivers/can/rtcan_dev.h.REFCOUNT	2006-08-23 22:12:20.000000000 +0200
+++ xenomai/ksrc/drivers/can/rtcan_dev.h	2006-09-12 18:28:57.000000000 +0200
@@ -45,7 +45,9 @@
 
 /* Suppress handling of refcount if module support is not enabled
  * or modules cannot be unloaded */
-#if defined(CONFIG_MODULES) && !defined(CONFIG_MODULE_UNLOAD)
+
+#ifdef CONFIG_MODULES
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) || defined(CONFIG_MODULE_UNLOAD)
 #define RTCAN_USE_REFCOUNT
 #endif
 

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

* Re: [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h
  2006-09-12 16:32 ` Wolfgang Grandegger
@ 2006-09-12 17:21   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2006-09-12 17:21 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

Wolfgang Grandegger wrote:
> Matthias Fuchs wrote:
>> Hi Jan,
>>
>> I think there's is little typo in rtcan_dev.h:
>>
>> Index: rtcan_dev.h
>> ===================================================================
>> --- rtcan_dev.h (revision 1564)
>> +++ rtcan_dev.h (working copy)
>> @@ -45,7 +45,7 @@
>>  
>>  /* Suppress handling of refcount if module support is not enabled
>>   * or modules cannot be unloaded */
>> -#if defined(CONFIG_MODULES) && !defined(CONFIG_MODULE_UNLOAD)
>> +#if defined(CONFIG_MODULES) && defined(CONFIG_MODULE_UNLOAD)
>>  #define RTCAN_USE_REFCOUNT
>>  #endif
>>
>>
>> This simple patch will allow unloading of modules.
> 
> Argh, I interpreted the meaning of CONFIG_MODULE_UNLOAD the other way
> round. But your fix will not work for 2.4, as there is no
> CONFIG_MODULE_UNLOAD. The attached one should be OK.
> 
> Thanks.
> 
> Wolfgang.
> 

Applied, thanks to both of you.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2006-09-12 17:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-12 15:55 [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h Matthias Fuchs
2006-09-12 16:32 ` Wolfgang Grandegger
2006-09-12 17:21   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.