]> Pileus Git - ~andy/linux/commitdiff
NET: pc300, show version info from module init
authorJiri Slaby <jslaby@suse.cz>
Mon, 5 Mar 2012 13:52:04 +0000 (14:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 19:47:01 +0000 (11:47 -0800)
Again, no need to do that from the pci probe function.

Hmm, I noticed this driver is marked as BROKEN. Won't touch it more,
it has to be converted to dynamic tty driver allocation first.

Perhaps it is time to move it to staging?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wan/pc300_drv.c

index a6dd00de41a4d6edd0eb5f2b7b6c5b3093f2a293..cb0f8d932b0c9b1c3d59e66af81102d1ea303d1d 100644 (file)
@@ -3231,7 +3231,7 @@ static void plx_init(pc300_t * card)
 
 }
 
-static inline void show_version(void)
+static void show_version(void)
 {
        char *rcsvers, *rcsdate, *tmp;
 
@@ -3412,16 +3412,10 @@ static void cpc_init_card(pc300_t * card)
 static int __devinit
 cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
-       static int first_time = 1;
        int err, eeprom_outdated = 0;
        u16 device_id;
        pc300_t *card;
 
-       if (first_time) {
-               first_time = 0;
-               show_version();
-       }
-
        if ((err = pci_enable_device(pdev)) < 0)
                return err;
 
@@ -3657,6 +3651,7 @@ static struct pci_driver cpc_driver = {
 
 static int __init cpc_init(void)
 {
+       show_version();
        return pci_register_driver(&cpc_driver);
 }