aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-11-16 03:00:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 19:18:08 -0500
commit312c004d36ce6c739512bac83b452f4c20ab1f62 (patch)
treee61e8331680a0da29557fe21414d3b31e62c9293 /drivers/w1
parent5f123fbd80f4f788554636f02bf73e40f914e0d6 (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/w1')
-rw-r--r--drivers/w1/w1.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 14016b1cd948..024206c4a0e4 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -142,12 +142,12 @@ static struct bin_attribute w1_slave_attr_bin_id = {
142/* Default family */ 142/* Default family */
143static struct w1_family w1_default_family; 143static struct w1_family w1_default_family;
144 144
145static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); 145static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size);
146 146
147static struct bus_type w1_bus_type = { 147static struct bus_type w1_bus_type = {
148 .name = "w1", 148 .name = "w1",
149 .match = w1_master_match, 149 .match = w1_master_match,
150 .hotplug = w1_hotplug, 150 .uevent = w1_uevent,
151}; 151};
152 152
153struct device_driver w1_master_driver = { 153struct device_driver w1_master_driver = {
@@ -361,7 +361,7 @@ void w1_destroy_master_attributes(struct w1_master *master)
361} 361}
362 362
363#ifdef CONFIG_HOTPLUG 363#ifdef CONFIG_HOTPLUG
364static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 364static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
365{ 365{
366 struct w1_master *md = NULL; 366 struct w1_master *md = NULL;
367 struct w1_slave *sl = NULL; 367 struct w1_slave *sl = NULL;
@@ -377,7 +377,7 @@ static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffe
377 event_owner = "slave"; 377 event_owner = "slave";
378 name = sl->name; 378 name = sl->name;
379 } else { 379 } else {
380 dev_dbg(dev, "Unknown hotplug event.\n"); 380 dev_dbg(dev, "Unknown event.\n");
381 return -EINVAL; 381 return -EINVAL;
382 } 382 }
383 383
@@ -386,18 +386,18 @@ static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffe
386 if (dev->driver != &w1_slave_driver || !sl) 386 if (dev->driver != &w1_slave_driver || !sl)
387 return 0; 387 return 0;
388 388
389 err = add_hotplug_env_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_FID=%02X", sl->reg_num.family); 389 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_FID=%02X", sl->reg_num.family);
390 if (err) 390 if (err)
391 return err; 391 return err;
392 392
393 err = add_hotplug_env_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (u64)sl->reg_num.id); 393 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (u64)sl->reg_num.id);
394 if (err) 394 if (err)
395 return err; 395 return err;
396 396
397 return 0; 397 return 0;
398}; 398};
399#else 399#else
400static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 400static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
401{ 401{
402 return 0; 402 return 0;
403} 403}