aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r--drivers/w1/w1.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index b41366a0784c..de3e9791f80d 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -391,7 +391,8 @@ static void w1_destroy_master_attributes(struct w1_master *master)
391} 391}
392 392
393#ifdef CONFIG_HOTPLUG 393#ifdef CONFIG_HOTPLUG
394static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 394static int w1_uevent(struct device *dev, char **envp, int num_envp,
395 char *buffer, int buffer_size)
395{ 396{
396 struct w1_master *md = NULL; 397 struct w1_master *md = NULL;
397 struct w1_slave *sl = NULL; 398 struct w1_slave *sl = NULL;
@@ -411,23 +412,28 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer
411 return -EINVAL; 412 return -EINVAL;
412 } 413 }
413 414
414 dev_dbg(dev, "Hotplug event for %s %s, bus_id=%s.\n", event_owner, name, dev->bus_id); 415 dev_dbg(dev, "Hotplug event for %s %s, bus_id=%s.\n",
416 event_owner, name, dev->bus_id);
415 417
416 if (dev->driver != &w1_slave_driver || !sl) 418 if (dev->driver != &w1_slave_driver || !sl)
417 return 0; 419 return 0;
418 420
419 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_FID=%02X", sl->reg_num.family); 421 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
422 &cur_len, "W1_FID=%02X", sl->reg_num.family);
420 if (err) 423 if (err)
421 return err; 424 return err;
422 425
423 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (u64)sl->reg_num.id); 426 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
427 &cur_len, "W1_SLAVE_ID=%024LX",
428 (unsigned long long)sl->reg_num.id);
424 if (err) 429 if (err)
425 return err; 430 return err;
426 431
427 return 0; 432 return 0;
428}; 433};
429#else 434#else
430static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 435static int w1_uevent(struct device *dev, char **envp, int num_envp,
436 char *buffer, int buffer_size)
431{ 437{
432 return 0; 438 return 0;
433} 439}
@@ -451,7 +457,8 @@ static int __w1_attach_slave_device(struct w1_slave *sl)
451 (unsigned int) sl->reg_num.family, 457 (unsigned int) sl->reg_num.family,
452 (unsigned long long) sl->reg_num.id); 458 (unsigned long long) sl->reg_num.id);
453 459
454 dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__, &sl->dev.bus_id[0]); 460 dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
461 &sl->dev.bus_id[0]);
455 462
456 err = device_register(&sl->dev); 463 err = device_register(&sl->dev);
457 if (err < 0) { 464 if (err < 0) {