hwmon: tegra: tsensor: lp0 save/restore configuration
[linux-2.6.git] / drivers / hwmon / gpio-fan.c
index aa701a1..89aa9fb 100644 (file)
@@ -116,7 +116,7 @@ static int fan_alarm_init(struct gpio_fan_data *fan_data,
                return 0;
 
        INIT_WORK(&fan_data->alarm_work, fan_alarm_notify);
-       set_irq_type(alarm_irq, IRQ_TYPE_EDGE_BOTH);
+       irq_set_irq_type(alarm_irq, IRQ_TYPE_EDGE_BOTH);
        err = request_irq(alarm_irq, fan_alarm_irq_handler, IRQF_SHARED,
                          "GPIO fan alarm", fan_data);
        if (err)
@@ -376,10 +376,6 @@ static int fan_ctrl_init(struct gpio_fan_data *fan_data,
                }
        }
 
-       err = sysfs_create_group(&pdev->dev.kobj, &gpio_fan_ctrl_group);
-       if (err)
-               goto err_free_gpio;
-
        fan_data->num_ctrl = num_ctrl;
        fan_data->ctrl = ctrl;
        fan_data->num_speed = pdata->num_speed;
@@ -391,6 +387,10 @@ static int fan_ctrl_init(struct gpio_fan_data *fan_data,
                goto err_free_gpio;
        }
 
+       err = sysfs_create_group(&pdev->dev.kobj, &gpio_fan_ctrl_group);
+       if (err)
+               goto err_free_gpio;
+
        return 0;
 
 err_free_gpio: