mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUG
Move uevent specific logic from the core into kobject_uevent.c, which does no longer require to link the unused string array if hotplug is not compiled in. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
07c015e765
commit
5c5daf657c
4 changed files with 57 additions and 31 deletions
|
@ -58,9 +58,6 @@ enum kobject_action {
|
|||
KOBJ_MAX
|
||||
};
|
||||
|
||||
/* The list of strings defining the valid kobject actions as specified above */
|
||||
extern const char *kobject_actions[];
|
||||
|
||||
struct kobject {
|
||||
const char * k_name;
|
||||
struct kref kref;
|
||||
|
@ -241,6 +238,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
|||
|
||||
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
|
||||
int kobject_action_type(const char *buf, size_t count,
|
||||
enum kobject_action *type);
|
||||
#else
|
||||
static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action)
|
||||
{ return 0; }
|
||||
|
@ -251,6 +251,10 @@ static inline int kobject_uevent_env(struct kobject *kobj,
|
|||
|
||||
static inline int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
|
||||
{ return 0; }
|
||||
|
||||
static inline int kobject_action_type(const char *buf, size_t count,
|
||||
enum kobject_action *type)
|
||||
{ return -EINVAL; }
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue