]> Git Repo - J-linux.git/commitdiff
PNP: Hide pnp_bus_type from the non-PNP code
authorAndy Shevchenko <[email protected]>
Tue, 28 May 2024 10:25:03 +0000 (13:25 +0300)
committerRafael J. Wysocki <[email protected]>
Tue, 28 May 2024 19:53:51 +0000 (21:53 +0200)
The pnp_bus_type is defined only when CONFIG_PNP=y, while being
not guarded by ifdeffery in the header. Moreover, it's not used
outside of the PNP code. Move it to the internal header to make
sure no-one will try to (ab)use it.

Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/pnp/base.h
include/linux/pnp.h

index e74a0f6a31572bf53c87f4dfbb34cf7d76208f8f..4e80273dfb1ec9c90053faee5e1330875f3508fe 100644 (file)
@@ -6,6 +6,7 @@
 
 extern struct mutex pnp_lock;
 extern const struct attribute_group *pnp_dev_groups[];
+extern const struct bus_type pnp_bus_type;
 
 int pnp_register_protocol(struct pnp_protocol *protocol);
 void pnp_unregister_protocol(struct pnp_protocol *protocol);
index a8def1cea32c00a97e01aa61624ad26d68344868..7f2ff95d2deb5e4a79dad6cf96ae9626e9ef1bd0 100644 (file)
@@ -435,8 +435,6 @@ struct pnp_protocol {
 #define protocol_for_each_dev(protocol, dev)   \
        list_for_each_entry(dev, &(protocol)->devices, protocol_list)
 
-extern const struct bus_type pnp_bus_type;
-
 #if defined(CONFIG_PNP)
 
 /* device management */
This page took 0.056488 seconds and 4 git commands to generate.