linux-next: manual merge of the driver-core tree with the pci tree

3 messages, 3 authors, 2012-02-28 · open the first message on its own page

linux-next: manual merge of the driver-core tree with the pci tree

From: Stephen Rothwell <hidden>
Date: 2012-02-28 03:29:37

Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
pci tree and commit aad4f4000cec ("PCI: Add helper macro for
pci_register_driver boilerplate") from the driver-core tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc include/linux/pci.h
index 5584aac,d4afd70..0000000
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@@ -947,7 -946,20 +947,20 @@@ int __must_check __pci_register_driver(
  	__pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
  
  void pci_unregister_driver(struct pci_driver *dev);
+ 
+ /**
+  * module_pci_driver() - Helper macro for registering a PCI driver
+  * @__pci_driver: pci_driver struct
+  *
+  * Helper macro for PCI drivers which do not do anything special in module
+  * init/exit. This eliminates a lot of boilerplate. Each module may only
+  * use this macro once, and calling it replaces module_init() and module_exit()
+  */
+ #define module_pci_driver(__pci_driver) \
+ 	module_driver(__pci_driver, pci_register_driver, \
+ 		       pci_unregister_driver)
+ 
 -void pci_remove_behind_bridge(struct pci_dev *dev);
 +void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
  struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
  int pci_add_dynid(struct pci_driver *drv,
  		  unsigned int vendor, unsigned int device,

Re: linux-next: manual merge of the driver-core tree with the pci tree

From: Yinghai Lu <yinghai@kernel.org>
Date: 2012-02-28 04:39:03

On Mon, Feb 27, 2012 at 7:29 PM, Stephen Rothwell [off-list ref] wrote:
quoted hunk
Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
pci tree and commit aad4f4000cec ("PCI: Add helper macro for
pci_register_driver boilerplate") from the driver-core tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc include/linux/pci.h
index 5584aac,d4afd70..0000000
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@@ -947,7 -946,20 +947,20 @@@ int __must_check __pci_register_driver(
       __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)

 void pci_unregister_driver(struct pci_driver *dev);
+
+ /**
+  * module_pci_driver() - Helper macro for registering a PCI driver
+  * @__pci_driver: pci_driver struct
+  *
+  * Helper macro for PCI drivers which do not do anything special in module
+  * init/exit. This eliminates a lot of boilerplate. Each module may only
+  * use this macro once, and calling it replaces module_init() and module_exit()
+  */
+ #define module_pci_driver(__pci_driver) \
+       module_driver(__pci_driver, pci_register_driver, \
+                      pci_unregister_driver)
+
 -void pci_remove_behind_bridge(struct pci_dev *dev);
 +void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
 struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
 int pci_add_dynid(struct pci_driver *drv,
                 unsigned int vendor, unsigned int device,

yes. we rename pci_remove_* to pci_stop_and_remove_*.

BTW, include/linux/pci.h looks like a mess. We should tidy it up

Thanks

Yinghai

Re: linux-next: manual merge of the driver-core tree with the pci tree

From: Greg KH <hidden>
Date: 2012-02-28 16:22:05

On Tue, Feb 28, 2012 at 02:29:09PM +1100, Stephen Rothwell wrote:
Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
include/linux/pci.h between commit 6754b9e9c335 ("PCI: Rename
pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge") from the
pci tree and commit aad4f4000cec ("PCI: Add helper macro for
pci_register_driver boilerplate") from the driver-core tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
Looks good to me, thanks for the fixup.

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help