From d2fc60d6925574eeeadd037aa0f1378e07189a1a Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 5 May 2008 11:53:45 -0400 Subject: HWMON: hdaps - set up phys and bus type of input device Signed-off-by: Dmitry Torokhov --- drivers/hwmon/hdaps.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index bab5fd2e4df..ea4fc657759 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c @@ -573,6 +573,8 @@ static int __init hdaps_init(void) /* initialize the input class */ idev = hdaps_idev->input; idev->name = "hdaps"; + idev->phys = "isa1600/input0"; + idev->id.bustype = BUS_ISA; idev->dev.parent = &pdev->dev; idev->evbit[0] = BIT_MASK(EV_ABS); input_set_abs_params(idev, ABS_X, -- cgit v1.2.3 From 2871f55237e2aaa00fd724ce45b47e567974045f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 May 2008 12:52:33 -0700 Subject: device create: hwmon: convert device_create to device_create_drvdata device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Mark M. Hoffman Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/hwmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 3db28450a3b..7321a88a511 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -55,7 +55,8 @@ again: return ERR_PTR(err); id = id & MAX_ID_MASK; - hwdev = device_create(hwmon_class, dev, MKDEV(0,0), HWMON_ID_FORMAT, id); + hwdev = device_create_drvdata(hwmon_class, dev, MKDEV(0, 0), NULL, + HWMON_ID_FORMAT, id); if (IS_ERR(hwdev)) { spin_lock(&idr_lock); -- cgit v1.2.3