Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit edcde84

Browse files
andy-shevrafaeljw
authored andcommitted
PNP: Hide pnp_bus_type from the non-PNP code
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 <andy.shevchenko@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent c7a5096 commit edcde84

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

drivers/pnp/base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
extern struct mutex pnp_lock;
88
extern const struct attribute_group *pnp_dev_groups[];
9+
extern const struct bus_type pnp_bus_type;
910

1011
int pnp_register_protocol(struct pnp_protocol *protocol);
1112
void pnp_unregister_protocol(struct pnp_protocol *protocol);

include/linux/pnp.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ struct pnp_protocol {
435435
#define protocol_for_each_dev(protocol, dev) \
436436
list_for_each_entry(dev, &(protocol)->devices, protocol_list)
437437

438-
extern const struct bus_type pnp_bus_type;
439-
440438
#if defined(CONFIG_PNP)
441439

442440
/* device management */

0 commit comments

Comments
 (0)