[PATCH] net/via-rhine: convert MODULE_PARM to module_param

From: Jesper Juhl (juhl-lkml_at_dif.dk)
Date: 11/30/04

  • Next message: Jesper Juhl: "Re: ds1620: replace schedule_timeout() with msleep()"
    Date:	Tue, 30 Nov 2004 00:58:58 +0100 (CET)
    To: Roger Luethi <rl@hellgate.ch>
    
    

    Hi,

    These warnings told me that it was time to move to module_param() :)

    drivers/net/via-rhine.c:229: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
    drivers/net/via-rhine.c:230: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)
    drivers/net/via-rhine.c:231: warning: `MODULE_PARM_' is deprecated (declared at include/linux/module.h:562)

    So I made this small patch to do so.
    Compile and boot tested on my box, and it seems to work just fine, the
    module works perfectly with my via-rhine card, and the parameters are
    exposed through sysfs as expected :

    juhl@dragon:~$ ls -l /sys/module/via_rhine/parameters/*
    -rw-r--r-- 1 root root 0 2004-11-30 00:51 /sys/module/via_rhine/parameters/debug
    -r--r--r-- 1 root root 0 2004-11-30 00:50 /sys/module/via_rhine/parameters/max_interrupt_work
    -r--r--r-- 1 root root 4096 2004-11-30 00:50 /sys/module/via_rhine/parameters/rx_copybreak

    juhl@dragon:~$ cat /sys/module/via_rhine/parameters/debug
    1
    juhl@dragon:~$ cat /sys/module/via_rhine/parameters/max_interrupt_work
    20
    juhl@dragon:~$ cat /sys/module/via_rhine/parameters/rx_copybreak
    0

    Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

    diff -up linux-2.6.10-rc2-bk13-orig/drivers/net/via-rhine.c linux-2.6.10-rc2-bk13/drivers/net/via-rhine.c
    --- linux-2.6.10-rc2-bk13-orig/drivers/net/via-rhine.c 2004-11-17 01:19:51.000000000 +0100
    +++ linux-2.6.10-rc2-bk13/drivers/net/via-rhine.c 2004-11-30 00:16:36.000000000 +0100
    @@ -226,9 +226,9 @@ MODULE_AUTHOR("Donald Becker <becker@scy
     MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver");
     MODULE_LICENSE("GPL");
     
    -MODULE_PARM(max_interrupt_work, "i");
    -MODULE_PARM(debug, "i");
    -MODULE_PARM(rx_copybreak, "i");
    +module_param(max_interrupt_work, int, 0444);
    +module_param(debug, int, 0644);
    +module_param(rx_copybreak, int, 0444);
     MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
     MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
     MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jesper Juhl: "Re: ds1620: replace schedule_timeout() with msleep()"

    Relevant Pages

    • Re: [GIT PATCH] SCSI merge for 2.6.13
      ... Btw, I see the patch that is supposed to fix it, but I'm in no position to ... introduces this bogus "assume a patch that wasn't merged" (commit ID ... place since it was known to not even compile. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 2/2] new valid_signal function - convert code that currently tests _NSIG directly to use the
      ... warning in fs/fcntl.c, during the discussion Matthew Wilcox noted that ... Below is the second patch that puts the valid_signalfunction to actual ... int disallow_signal ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: swsusp: revert to 2.6.0-test3 state
      ... > not benefit either of us for you to intentionally break my code in return, ... It will not only introduce a compile warning, ... static int pm_suspend_disk ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix gcc -W warning in netdevice.h
      ... Here's a patch. ... +static inline u32 netif_msg_init(unsigned int debug_value, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: keep in sync with -mm tree?
      ... It also allows comments like "EDAC is known to not compile ... I'll take a look at uploading a nightly rollup as well. ... > apply's then a part of the patch which was entirely rejected, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)