From: Wolfgang Grandegger <wg@domain.hid>
To: Matthias Fuchs <mfuchs@domain.hid>
Cc: Jan Kiszka <jan.kiszka@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h
Date: Tue, 12 Sep 2006 18:32:26 +0200 [thread overview]
Message-ID: <4506E11A.6030203@domain.hid> (raw)
In-Reply-To: <200609121755.04559.mfuchs@domain.hid>
[-- 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
next prev parent reply other threads:[~2006-09-12 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 15:55 [Xenomai-core] RTCAN_USE_REFCOUNT issue in rtcan_dev.h Matthias Fuchs
2006-09-12 16:32 ` Wolfgang Grandegger [this message]
2006-09-12 17:21 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4506E11A.6030203@domain.hid \
--to=wg@domain.hid \
--cc=jan.kiszka@domain.hid \
--cc=mfuchs@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.