Skip to contentSkip to conversation

staging/comedi: Add pci_driver.name to skel driver

PATCH Superseded Peter Huewe 2 participants 7 messages Jan 21, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging/comedi: Add pci_driver.name to skel driver

This patch adds the comedi_driver.name to pci_driver.name to the skel driver, so we can remove the workaround in drivers.c

---
 drivers/staging/comedi/drivers/skel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/drivers/skel.c +1 -0
index e2d7970..4a40498 100644
@@ -713,6 +713,7 @@ static void skel_pci_remove(struct pci_dev *dev)
 }
 
 static struct pci_driver skel_pci_driver = {
+	.name = "dummy"
 	.id_table = skel_pci_table,
 	.probe = &skel_pci_probe,
 	.remove = &skel_pci_remove
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 2/2 staging/comedi: remove workaround for !pci_driver.name

All pci drivers in drivers/ have the pci_driver.name field set, so we can remove this workaround and the accompanying todo.

---
 drivers/staging/comedi/drivers.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/staging/comedi/drivers.c +0 -4
index 8b681ac..cebdd9e 100644
@@ -536,10 +536,6 @@ int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
 	if (ret < 0)
 		return ret;
 
-	/* FIXME: Remove this test after auditing all comedi pci drivers */
-	if (!pci_driver->name)
-		pci_driver->name = comedi_driver->driver_name;
-
 	ret = pci_register_driver(pci_driver);
 	if (ret < 0) {
 		comedi_driver_unregister(comedi_driver);
Signature · 1 line
1.7.8.6
Reviewed-by on v1 1/2
#2 lore raw
In reply to Peter Huewe
Quoted 13 lines · Peter Huewe

This patch adds the comedi_driver.name to pci_driver.name to the skel driver, so we can remove the workaround in drivers.c

---
 drivers/staging/comedi/drivers/skel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/drivers/skel.c +0 -0
index e2d7970..4a40498 100644

drivers/staging/comedi/drivers/skel.c static void skel_pci_remove(struct pci_dev *dev) · line 719

Quoted 7 lines
drivers/staging/comedi/drivers/skel.c +1 -0
@@ -713,6 +713,7 @@ static void skel_pci_remove(struct pci_dev *dev)
 }
 
 static struct pci_driver skel_pci_driver = {
+	.name = "dummy"
 	.id_table = skel_pci_table,
 	.probe = &skel_pci_probe,
 	.remove = &skel_pci_remove

Hmm... I was just about to post a rebase of the last part of my drivers.c cleanup that included this and your 2/2 patch.

Oh well... Rebase again...

FWIW, for both patches.

#3 lore raw

Am Montag, 21. Januar 2013, 21:56:22 schrieb H Hartley Sweeten:

Quoted 29 lines · Peter Huewe
Quoted 21 lines

This patch adds the comedi_driver.name to pci_driver.name to the skel driver, so we can remove the workaround in drivers.c

---

 drivers/staging/comedi/drivers/skel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/comedi/drivers/skel.c index e2d7970..4a40498 100644

drivers/staging/comedi/drivers/skel.c +1 -0
@@ -713,6 +713,7 @@ static void skel_pci_remove(struct pci_dev *dev)
 
 }
 
 static struct pci_driver skel_pci_driver = {
 
+	.name = "dummy"
 

drivers/staging/comedi/drivers/skel.c static void skel_pci_remove(struct pci_dev *dev) · line 719

Quoted 3 lines
drivers/staging/comedi/drivers/skel.c +0 -0
 	.id_table = skel_pci_table,
 	.probe = &skel_pci_probe,
 	.remove = &skel_pci_remove

Hmm... I was just about to post a rebase of the last part of my drivers.c cleanup that included this and your 2/2 patch.

Quoted 5 lines

Oh well... Rebase again...

FWIW, for both patches.

It's okay to drop my patches so you don't have to rebase.

(I posted a version with the missing comma nevertheless)

Thanks,
Peter

#4 lore raw
Quoted 4 lines · Peter Hüwe

It's okay to drop my patches so you don't have to rebase.

(I posted a version with the missing comma nevertheless)

Peter,

Your updated versions are ok. I'm about done with the rebase anyway. Please make sure to at least compile test your patches before posting in the future.

Greg,

These two patches need to be applied before my cleanup series for the comedi drivers.c file. I'll be posting them shortly.

Thanks,
Hartley

#5 lore raw
In reply to Peter Huewe
Quoted 13 lines · Peter Huewe

This patch adds the comedi_driver.name to pci_driver.name to the skel driver, so we can remove the workaround in drivers.c

---
 drivers/staging/comedi/drivers/skel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/drivers/skel.c +0 -0
index e2d7970..4a40498 100644

drivers/staging/comedi/drivers/skel.c static void skel_pci_remove(struct pci_dev *dev) · line 716

Quoted 4 lines
drivers/staging/comedi/drivers/skel.c +1 -0
@@ -713,6 +713,7 @@ static void skel_pci_remove(struct pci_dev *dev)
 }
 
 static struct pci_driver skel_pci_driver = {
+	.name = "dummy"

Peter,

Missing comma at the end. Did you build this?

Hartley

#6 lore raw

PATCH v2 1/1 staging/comedi: Add pci_driver.name to skel driver

This patch adds the comedi_driver.name to pci_driver.name to the skel driver, so we can remove the workaround in drivers.c

---
missed a comma, sorry

 drivers/staging/comedi/drivers/skel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/staging/comedi/drivers/skel.c +1 -0
index e2d7970..48178ca 100644
@@ -713,6 +713,7 @@ static void skel_pci_remove(struct pci_dev *dev)
 }
 
 static struct pci_driver skel_pci_driver = {
+	.name = "dummy",
 	.id_table = skel_pci_table,
 	.probe = &skel_pci_probe,
 	.remove = &skel_pci_remove
Signature · 1 line
1.7.8.6