[PATCH 626/641] Staging: rt3090: remove possible conflict with rt2860

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Axel K <rain_maker@xxxxxxxxxxxxxx>

Both drivers (rt2860 and rt3090) register themselves as "rt2860" on
loading the module.

In the very rare case of somebody having two cards in his machine, one
using rt3090 and the other one using the rt2860 driver, loading both
modules would be impossible, the second one will not be loaded as the
kernel will tell you that the driver is already registered.

This was also present with rt2870/rt3070 (with both driver registering
as "rt2870"), but the code has been merged to one driver recently.

The follwoing patch fixes this potential problem until merging of
rt2860/rt3090 code to a single driver.

Signed-off-by: Axel Koellhofer <rain_maker@xxxxxxxxxxxxxx>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/rt3090/pci_main_dev.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rt3090/pci_main_dev.c b/drivers/staging/rt3090/pci_main_dev.c
index 4997d3a..1410156 100644
--- a/drivers/staging/rt3090/pci_main_dev.c
+++ b/drivers/staging/rt3090/pci_main_dev.c
@@ -106,7 +106,7 @@ MODULE_VERSION(STA_DRIVER_VERSION);
 //
 static struct pci_driver rt2860_driver =
 {
-    name:       "rt2860",
+    name:       "rt3090",
     id_table:   rt2860_pci_tbl,
     probe:      rt2860_probe,
 #if LINUX_VERSION_CODE >= 0x20412
@@ -326,9 +326,9 @@ static INT __devinit   rt2860_probe(
 	}
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-	print_name = pci_dev ? pci_name(pci_dev) : "rt2860";
+	print_name = pci_dev ? pci_name(pci_dev) : "rt3090";
 #else
-	print_name = pci_dev ? pci_dev->slot_name : "rt2860";
+	print_name = pci_dev ? pci_dev->slot_name : "rt3090";
 #endif // LINUX_VERSION_CODE //
 
 	if ((rv = pci_request_regions(pci_dev, print_name)) != 0)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux