* [Xenomai-core] [PATCH] small cleanups for rtcan_peak_dng
@ 2007-05-25 11:04 Jan Kiszka
2007-05-25 13:24 ` Wolfgang Grandegger
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2007-05-25 11:04 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 2433 bytes --]
Hi Wolfgang,
I came across the fact that xeno_can_peak_dng is autoloaded on 2.6 due to
its PnP announcement via MODULE_DEVICE_TABLE. xeno_irqbench and
xeno_16550A used to behave similar, but both just as well as this driver
require manual parameters anyway. So let's remove the table and thus any
autoloading tendency. I also cleaned up a few driver messages at this
chance.
OK to apply?
Jan
---
ChangeLog | 5 +++++
ksrc/drivers/can/sja1000/rtcan_peak_dng.c | 9 ++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ xenomai/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-25 Jan Kiszka <jan.kiszka@domain.hid>
+
+ * ksrc/drivers/can/sja1000/rtcan_peak_dng.c: Remove PnP device
+ table to avoid autoloading. Fix driver error messages.
+
2007-05-25 Philippe Gerum <rpm@xenomai.org>
* ksrc/nucleus/shadow.c (do_sigwake_event): Replace silent sanity
Index: xenomai/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
===================================================================
--- xenomai.orig/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
+++ xenomai/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
@@ -224,7 +224,7 @@ int __init rtcan_peak_dng_init_one(int i
else if (strncmp(type[idx], "epp", 3) == 0)
dtype = DONGLE_TYPE_EPP;
else {
- printk("%s: type %s is invalid, use \"sp\" or \"sp\".",
+ printk("%s: type %s is invalid, use \"sp\" or \"epp\".",
RTCAN_DRV_NAME, type[idx]);
return -EINVAL;
}
@@ -329,8 +329,6 @@ static const struct pnp_device_id rtcan_
{ }
};
-MODULE_DEVICE_TABLE(pnp, rtcan_peak_dng_pnp_tbl);
-
static int rtcan_peak_dng_pnp_probe(struct pnp_dev *dev,
const struct pnp_device_id *id)
{
@@ -378,7 +376,7 @@ static int __init rtcan_peak_dng_init(vo
i++) {
if ((ret = rtcan_peak_dng_init_one(i)) != 0) {
- printk("Init failed with %d\n", ret);
+ printk(KERN_ERR "%s: Init failed with %d\n", RTCAN_DRV_NAME, ret);
goto cleanup;
}
done++;
@@ -386,7 +384,8 @@ static int __init rtcan_peak_dng_init(vo
if (done)
return 0;
- printk("Please specify type=epp or type=sp\n");
+ printk(KERN_ERR "%s: Please specify type=epp or type=sp\n",
+ RTCAN_DRV_NAME);
cleanup:
rtcan_peak_dng_exit();
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-core] [PATCH] small cleanups for rtcan_peak_dng
2007-05-25 11:04 [Xenomai-core] [PATCH] small cleanups for rtcan_peak_dng Jan Kiszka
@ 2007-05-25 13:24 ` Wolfgang Grandegger
2007-05-25 13:36 ` Wolfgang Grandegger
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Grandegger @ 2007-05-25 13:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Hallo Jan,
Jan Kiszka wrote:
> Hi Wolfgang,
>
> I came across the fact that xeno_can_peak_dng is autoloaded on 2.6 due to
> its PnP announcement via MODULE_DEVICE_TABLE. xeno_irqbench and
> xeno_16550A used to behave similar, but both just as well as this driver
> require manual parameters anyway. So let's remove the table and thus any
> autoloading tendency. I also cleaned up a few driver messages at this
> chance.
>
> OK to apply?
Ja, sieht gut aus und bei dir funktioniert es ja auch.
Ein Kunde von uns evaluiert gerade CAN-Festival mit RT-Socket-CAN auf
einem MPC5200-Board. Mal sehen, was dabei rauskommt.
Die Socket-CAN-Integration hat ja jetzt auch begonnen. Da bin ich mal
gespannt. Sollte mal wieder die linux-netdev ML durchschauen.
Dann erstmal schöne Feiertage.
Viele Grüße,
Wolfgang.
> ---
> ChangeLog | 5 +++++
> ksrc/drivers/can/sja1000/rtcan_peak_dng.c | 9 ++++-----
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> Index: xenomai/ChangeLog
> ===================================================================
> --- xenomai.orig/ChangeLog
> +++ xenomai/ChangeLog
> @@ -1,3 +1,8 @@
> +2007-05-25 Jan Kiszka <jan.kiszka@domain.hid>
> +
> + * ksrc/drivers/can/sja1000/rtcan_peak_dng.c: Remove PnP device
> + table to avoid autoloading. Fix driver error messages.
> +
> 2007-05-25 Philippe Gerum <rpm@xenomai.org>
>
> * ksrc/nucleus/shadow.c (do_sigwake_event): Replace silent sanity
> Index: xenomai/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
> ===================================================================
> --- xenomai.orig/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
> +++ xenomai/ksrc/drivers/can/sja1000/rtcan_peak_dng.c
> @@ -224,7 +224,7 @@ int __init rtcan_peak_dng_init_one(int i
> else if (strncmp(type[idx], "epp", 3) == 0)
> dtype = DONGLE_TYPE_EPP;
> else {
> - printk("%s: type %s is invalid, use \"sp\" or \"sp\".",
> + printk("%s: type %s is invalid, use \"sp\" or \"epp\".",
> RTCAN_DRV_NAME, type[idx]);
> return -EINVAL;
> }
> @@ -329,8 +329,6 @@ static const struct pnp_device_id rtcan_
> { }
> };
>
> -MODULE_DEVICE_TABLE(pnp, rtcan_peak_dng_pnp_tbl);
> -
> static int rtcan_peak_dng_pnp_probe(struct pnp_dev *dev,
> const struct pnp_device_id *id)
> {
> @@ -378,7 +376,7 @@ static int __init rtcan_peak_dng_init(vo
> i++) {
>
> if ((ret = rtcan_peak_dng_init_one(i)) != 0) {
> - printk("Init failed with %d\n", ret);
> + printk(KERN_ERR "%s: Init failed with %d\n", RTCAN_DRV_NAME, ret);
> goto cleanup;
> }
> done++;
> @@ -386,7 +384,8 @@ static int __init rtcan_peak_dng_init(vo
> if (done)
> return 0;
>
> - printk("Please specify type=epp or type=sp\n");
> + printk(KERN_ERR "%s: Please specify type=epp or type=sp\n",
> + RTCAN_DRV_NAME);
>
> cleanup:
> rtcan_peak_dng_exit();
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-core] [PATCH] small cleanups for rtcan_peak_dng
2007-05-25 13:24 ` Wolfgang Grandegger
@ 2007-05-25 13:36 ` Wolfgang Grandegger
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Grandegger @ 2007-05-25 13:36 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: Jan Kiszka, xenomai-core
Hello,
sorry, didn't realize the CC to the xenomai-core ML :-(. Here the
English translation:
Wolfgang Grandegger wrote:
> Hallo Jan,
>
> Jan Kiszka wrote:
>> Hi Wolfgang,
>>
>> I came across the fact that xeno_can_peak_dng is autoloaded on 2.6 due to
>> its PnP announcement via MODULE_DEVICE_TABLE. xeno_irqbench and
>> xeno_16550A used to behave similar, but both just as well as this driver
>> require manual parameters anyway. So let's remove the table and thus any
>> autoloading tendency. I also cleaned up a few driver messages at this
>> chance.
>>
>> OK to apply?
>
> Ja, sieht gut aus und bei dir funktioniert es ja auch.
Yes, looks good and it's working for you, I assume.
> Ein Kunde von uns evaluiert gerade CAN-Festival mit RT-Socket-CAN auf
> einem MPC5200-Board. Mal sehen, was dabei rauskommt.
FYI, a customer is currently evaluating CAN-Festival, a free CANopen
implementation, with RT-Socket-CAN on a MPC5200. The rest is off-topic here.
> Die Socket-CAN-Integration hat ja jetzt auch begonnen. Da bin ich mal
> gespannt. Sollte mal wieder die linux-netdev ML durchschauen.
FYI, the request for inclusion of Socket-CAN into the kernel has started
on linux-netdev.
> Dann erstmal schöne Feiertage.
Have a nice weekend.
Wolfgang.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-25 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25 11:04 [Xenomai-core] [PATCH] small cleanups for rtcan_peak_dng Jan Kiszka
2007-05-25 13:24 ` Wolfgang Grandegger
2007-05-25 13:36 ` Wolfgang Grandegger
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.