gpio-fan.c (27eb2c4b3d3e13f376a359e293c212a2e9407af5) | gpio-fan.c (a8b3a3a53f9a814e9938ea9cc179086ff5c0a387) |
---|---|
1/* 2 * gpio-fan.c - Hwmon driver for fans connected to GPIO lines. 3 * 4 * Copyright (C) 2010 LaCie 5 * 6 * Author: Simon Guinot <sguinot@lacie.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 481 unchanged lines hidden (view full) --- 490 {}, 491}; 492#endif /* CONFIG_OF_GPIO */ 493 494static int gpio_fan_probe(struct platform_device *pdev) 495{ 496 int err; 497 struct gpio_fan_data *fan_data; | 1/* 2 * gpio-fan.c - Hwmon driver for fans connected to GPIO lines. 3 * 4 * Copyright (C) 2010 LaCie 5 * 6 * Author: Simon Guinot <sguinot@lacie.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 481 unchanged lines hidden (view full) --- 490 {}, 491}; 492#endif /* CONFIG_OF_GPIO */ 493 494static int gpio_fan_probe(struct platform_device *pdev) 495{ 496 int err; 497 struct gpio_fan_data *fan_data; |
498 struct gpio_fan_platform_data *pdata = pdev->dev.platform_data; | 498 struct gpio_fan_platform_data *pdata = dev_get_platdata(&pdev->dev); |
499 500#ifdef CONFIG_OF_GPIO 501 if (!pdata) { 502 pdata = devm_kzalloc(&pdev->dev, 503 sizeof(struct gpio_fan_platform_data), 504 GFP_KERNEL); 505 if (!pdata) 506 return -ENOMEM; --- 112 unchanged lines hidden --- | 499 500#ifdef CONFIG_OF_GPIO 501 if (!pdata) { 502 pdata = devm_kzalloc(&pdev->dev, 503 sizeof(struct gpio_fan_platform_data), 504 GFP_KERNEL); 505 if (!pdata) 506 return -ENOMEM; --- 112 unchanged lines hidden --- |