Re: [PATCH] staging: comedi: Add helper macro for comedi pci driverboilerplate

From: Ian Abbott
Date: Fri May 11 2012 - 13:42:24 EST


On 2012-05-11 18:34, H Hartley Sweeten wrote:
On Friday, May 11, 2012 10:32 AM, Ian Abbott wrote:
On 2012-05-11 18:07, H Hartley Sweeten wrote:
+int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
+ struct pci_driver *pci_driver)
+{
+ int ret;
+
+ ret = comedi_driver_register(comedi_driver);
+ if (ret< 0)
+ return ret;
+
+ pci_driver->name = comedi_driver->driver_name;

I think it would be better if the driver modules that call this function
already had pci_driver->name initialized statically.

I agree, but this is how all the pci drivers do it now.

To change this will require auditing all the comedi pci drivers and adding
the static name.

But if you're going to be calling this function from those drivers anyway, you might as well add the static names at the same time! Saves another round of patches.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/