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

From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Fri May 11 2012 - 17:59:45 EST


On Fri, May 11, 2012 at 01:26:37PM -0500, H Hartley Sweeten wrote:
> On Friday, May 11, 2012 11:14 AM, Ian Abbott wrote:
> > Okay, but I don't think it's worth doing three patches for each driver
> > where one would do. Adding a one-line .name = "foo", to the single
> > patch for each driver you were planning to do anyway seems like a
> > trivial addition that could be slotted into the patch without too much
> > argument from the "one change per patch" folks, especially if you
> > mention the purpose of that line in the commit message. (I'd defer to
> > the better judgement of Greg though.)
>
> With this patch my main goal was to not "break" any of the drivers.
>
> As a follow-up to this patch I was going to use the macro in all the
> pci drivers that have been refactored. Similar to what I did with the
> module_comedi_driver macro. When I do that I can add the static
> name field to those drivers.
>
> How about doing this in the register function:
>
> If (!pci_driver->name)
> pci_driver->name = comedi_driver->driver_name;
>
> This way all the drivers that still need to be refactored will still work.
>
> After all the drivers have been updated, those two lines can be
> removed.
>
> So we have this patch and one big patch updating all the refactored
> drivers. Some number of patches refactoring the remaining drivers
> and using the module_comedi_pci_driver macro. Then one last
> patch removing the check above.
>
> How does that sound?

That sounds reasonable to me.

greg k-h
--
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/