applesmc: Use the address as platform device ID
authorJean Delvare <khali@linux-fr.org>
Wed, 9 May 2007 03:27:04 +0000 (20:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 03:41:14 +0000 (20:41 -0700)
Let the applesmc device export its address to userspace.  libsensors needs
this to recognize the device and give it a unique ID.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hwmon/applesmc.c

index 3215f9c..5456e86 100644 (file)
@@ -1190,7 +1190,8 @@ static int __init applesmc_init(void)
        if (ret)
                goto out_region;
 
-       pdev = platform_device_register_simple("applesmc", -1, NULL, 0);
+       pdev = platform_device_register_simple("applesmc", APPLESMC_DATA_PORT,
+                                              NULL, 0);
        if (IS_ERR(pdev)) {
                ret = PTR_ERR(pdev);
                goto out_driver;