diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-11-16 03:00:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 19:18:08 -0500 |
commit | 312c004d36ce6c739512bac83b452f4c20ab1f62 (patch) | |
tree | e61e8331680a0da29557fe21414d3b31e62c9293 /drivers/input | |
parent | 5f123fbd80f4f788554636f02bf73e40f914e0d6 (diff) |
[PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 14 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 22 |
2 files changed, 18 insertions, 18 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 43b49ccd7dad..2d37b394e384 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -610,10 +610,10 @@ static void input_dev_release(struct class_device *class_dev) | |||
610 | } | 610 | } |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * Input hotplugging interface - loading event handlers based on | 613 | * Input uevent interface - loading event handlers based on |
614 | * device bitfields. | 614 | * device bitfields. |
615 | */ | 615 | */ |
616 | static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index, | 616 | static int input_add_uevent_bm_var(char **envp, int num_envp, int *cur_index, |
617 | char *buffer, int buffer_size, int *cur_len, | 617 | char *buffer, int buffer_size, int *cur_len, |
618 | const char *name, unsigned long *bitmap, int max) | 618 | const char *name, unsigned long *bitmap, int max) |
619 | { | 619 | { |
@@ -638,7 +638,7 @@ static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index, | |||
638 | 638 | ||
639 | #define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \ | 639 | #define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \ |
640 | do { \ | 640 | do { \ |
641 | int err = add_hotplug_env_var(envp, num_envp, &i, \ | 641 | int err = add_uevent_var(envp, num_envp, &i, \ |
642 | buffer, buffer_size, &len, \ | 642 | buffer, buffer_size, &len, \ |
643 | fmt, val); \ | 643 | fmt, val); \ |
644 | if (err) \ | 644 | if (err) \ |
@@ -647,15 +647,15 @@ static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index, | |||
647 | 647 | ||
648 | #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ | 648 | #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ |
649 | do { \ | 649 | do { \ |
650 | int err = input_add_hotplug_bm_var(envp, num_envp, &i, \ | 650 | int err = input_add_uevent_bm_var(envp, num_envp, &i, \ |
651 | buffer, buffer_size, &len, \ | 651 | buffer, buffer_size, &len, \ |
652 | name, bm, max); \ | 652 | name, bm, max); \ |
653 | if (err) \ | 653 | if (err) \ |
654 | return err; \ | 654 | return err; \ |
655 | } while (0) | 655 | } while (0) |
656 | 656 | ||
657 | static int input_dev_hotplug(struct class_device *cdev, char **envp, | 657 | static int input_dev_uevent(struct class_device *cdev, char **envp, |
658 | int num_envp, char *buffer, int buffer_size) | 658 | int num_envp, char *buffer, int buffer_size) |
659 | { | 659 | { |
660 | struct input_dev *dev = to_input_dev(cdev); | 660 | struct input_dev *dev = to_input_dev(cdev); |
661 | int i = 0; | 661 | int i = 0; |
@@ -697,7 +697,7 @@ static int input_dev_hotplug(struct class_device *cdev, char **envp, | |||
697 | struct class input_class = { | 697 | struct class input_class = { |
698 | .name = "input", | 698 | .name = "input", |
699 | .release = input_dev_release, | 699 | .release = input_dev_release, |
700 | .hotplug = input_dev_hotplug, | 700 | .uevent = input_dev_uevent, |
701 | }; | 701 | }; |
702 | 702 | ||
703 | struct input_dev *input_allocate_device(void) | 703 | struct input_dev *input_allocate_device(void) |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index fbb69ef6a77b..8e530cc970e1 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -800,16 +800,16 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv) | |||
800 | 800 | ||
801 | #ifdef CONFIG_HOTPLUG | 801 | #ifdef CONFIG_HOTPLUG |
802 | 802 | ||
803 | #define SERIO_ADD_HOTPLUG_VAR(fmt, val...) \ | 803 | #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ |
804 | do { \ | 804 | do { \ |
805 | int err = add_hotplug_env_var(envp, num_envp, &i, \ | 805 | int err = add_uevent_var(envp, num_envp, &i, \ |
806 | buffer, buffer_size, &len, \ | 806 | buffer, buffer_size, &len, \ |
807 | fmt, val); \ | 807 | fmt, val); \ |
808 | if (err) \ | 808 | if (err) \ |
809 | return err; \ | 809 | return err; \ |
810 | } while (0) | 810 | } while (0) |
811 | 811 | ||
812 | static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) | 812 | static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) |
813 | { | 813 | { |
814 | struct serio *serio; | 814 | struct serio *serio; |
815 | int i = 0; | 815 | int i = 0; |
@@ -820,21 +820,21 @@ static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *bu | |||
820 | 820 | ||
821 | serio = to_serio_port(dev); | 821 | serio = to_serio_port(dev); |
822 | 822 | ||
823 | SERIO_ADD_HOTPLUG_VAR("SERIO_TYPE=%02x", serio->id.type); | 823 | SERIO_ADD_UEVENT_VAR("SERIO_TYPE=%02x", serio->id.type); |
824 | SERIO_ADD_HOTPLUG_VAR("SERIO_PROTO=%02x", serio->id.proto); | 824 | SERIO_ADD_UEVENT_VAR("SERIO_PROTO=%02x", serio->id.proto); |
825 | SERIO_ADD_HOTPLUG_VAR("SERIO_ID=%02x", serio->id.id); | 825 | SERIO_ADD_UEVENT_VAR("SERIO_ID=%02x", serio->id.id); |
826 | SERIO_ADD_HOTPLUG_VAR("SERIO_EXTRA=%02x", serio->id.extra); | 826 | SERIO_ADD_UEVENT_VAR("SERIO_EXTRA=%02x", serio->id.extra); |
827 | SERIO_ADD_HOTPLUG_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", | 827 | SERIO_ADD_UEVENT_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", |
828 | serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); | 828 | serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); |
829 | envp[i] = NULL; | 829 | envp[i] = NULL; |
830 | 830 | ||
831 | return 0; | 831 | return 0; |
832 | } | 832 | } |
833 | #undef SERIO_ADD_HOTPLUG_VAR | 833 | #undef SERIO_ADD_UEVENT_VAR |
834 | 834 | ||
835 | #else | 835 | #else |
836 | 836 | ||
837 | static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) | 837 | static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) |
838 | { | 838 | { |
839 | return -ENODEV; | 839 | return -ENODEV; |
840 | } | 840 | } |
@@ -908,7 +908,7 @@ static int __init serio_init(void) | |||
908 | serio_bus.dev_attrs = serio_device_attrs; | 908 | serio_bus.dev_attrs = serio_device_attrs; |
909 | serio_bus.drv_attrs = serio_driver_attrs; | 909 | serio_bus.drv_attrs = serio_driver_attrs; |
910 | serio_bus.match = serio_bus_match; | 910 | serio_bus.match = serio_bus_match; |
911 | serio_bus.hotplug = serio_hotplug; | 911 | serio_bus.uevent = serio_uevent; |
912 | serio_bus.resume = serio_resume; | 912 | serio_bus.resume = serio_resume; |
913 | bus_register(&serio_bus); | 913 | bus_register(&serio_bus); |
914 | 914 | ||