Loading drivers/hwmon/gpio-fan.c +4 −13 Original line number Diff line number Diff line Loading @@ -537,7 +537,8 @@ static int gpio_fan_probe(struct platform_device *pdev) } /* Make this driver part of hwmon class. */ fan_data->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, fan_data->hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev, "gpio_fan", fan_data, gpio_fan_groups); if (IS_ERR(fan_data->hwmon_dev)) Loading @@ -548,15 +549,6 @@ static int gpio_fan_probe(struct platform_device *pdev) return 0; } static int gpio_fan_remove(struct platform_device *pdev) { struct gpio_fan_data *fan_data = platform_get_drvdata(pdev); hwmon_device_unregister(fan_data->hwmon_dev); return 0; } #ifdef CONFIG_PM_SLEEP static int gpio_fan_suspend(struct device *dev) { Loading Loading @@ -588,7 +580,6 @@ static SIMPLE_DEV_PM_OPS(gpio_fan_pm, gpio_fan_suspend, gpio_fan_resume); static struct platform_driver gpio_fan_driver = { .probe = gpio_fan_probe, .remove = gpio_fan_remove, .driver = { .name = "gpio-fan", .pm = GPIO_FAN_PM, Loading Loading
drivers/hwmon/gpio-fan.c +4 −13 Original line number Diff line number Diff line Loading @@ -537,7 +537,8 @@ static int gpio_fan_probe(struct platform_device *pdev) } /* Make this driver part of hwmon class. */ fan_data->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, fan_data->hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev, "gpio_fan", fan_data, gpio_fan_groups); if (IS_ERR(fan_data->hwmon_dev)) Loading @@ -548,15 +549,6 @@ static int gpio_fan_probe(struct platform_device *pdev) return 0; } static int gpio_fan_remove(struct platform_device *pdev) { struct gpio_fan_data *fan_data = platform_get_drvdata(pdev); hwmon_device_unregister(fan_data->hwmon_dev); return 0; } #ifdef CONFIG_PM_SLEEP static int gpio_fan_suspend(struct device *dev) { Loading Loading @@ -588,7 +580,6 @@ static SIMPLE_DEV_PM_OPS(gpio_fan_pm, gpio_fan_suspend, gpio_fan_resume); static struct platform_driver gpio_fan_driver = { .probe = gpio_fan_probe, .remove = gpio_fan_remove, .driver = { .name = "gpio-fan", .pm = GPIO_FAN_PM, Loading