[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120511175954.GA7920@kroah.com>
Date: Fri, 11 May 2012 10:59:54 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
devel@...verdev.osuosl.org, abbotti@....co.uk,
fmhess@...rs.sourceforge.net
Subject: Re: [PATCH] staging: comedi: Add helper macro for comedi pci driver
boilerplate
On Fri, May 11, 2012 at 10:07:43AM -0700, H Hartley Sweeten wrote:
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -950,6 +950,34 @@ void comedi_pci_auto_unconfig(struct pci_dev *pcidev)
> }
> EXPORT_SYMBOL_GPL(comedi_pci_auto_unconfig);
>
> +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;
> + ret = pci_register_driver(pci_driver);
> + if (ret < 0) {
> + comedi_driver_unregister(comedi_driver);
> + return ret;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(comedi_pci_driver_register);
> +
> +void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
> + struct pci_driver *pci_driver)
> +{
> + pci_unregister_driver(pci_driver);
> + comedi_driver_unregister(comedi_driver);
> +}
> +EXPORT_SYMBOL(comedi_pci_driver_unregister);
EXPORT_SYMBOL_GPL() for these two functions?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists