* [PATCH V2 03/35] watchdog: use dev_get_platdata()
@ 2013-07-30 10:58 Jingoo Han
2013-10-01 15:52 ` [V2,03/35] " Guenter Roeck
2013-10-29 7:37 ` [PATCH V2 03/35] " Wim Van Sebroeck
0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2013-07-30 10:58 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Wim Van Sebroeck',
linux-watchdog, 'Guenter Roeck',
Jingoo Han
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/watchdog/iTCO_wdt.c | 2 +-
drivers/watchdog/mv64x60_wdt.c | 2 +-
drivers/watchdog/omap_wdt.c | 2 +-
drivers/watchdog/rdc321x_wdt.c | 2 +-
drivers/watchdog/stmp3xxx_rtc_wdt.c | 4 ++--
drivers/watchdog/ux500_wdt.c | 2 +-
drivers/watchdog/wm831x_wdt.c | 8 +++-----
7 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 6130321..439b160 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -394,7 +394,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
{
int ret = -ENODEV;
unsigned long val32;
- struct lpc_ich_info *ich_info = dev->dev.platform_data;
+ struct lpc_ich_info *ich_info = dev_get_platdata(&dev->dev);
if (!ich_info)
goto out;
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index e4cf980..2f2ff19 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -255,7 +255,7 @@ static struct miscdevice mv64x60_wdt_miscdev = {
static int mv64x60_wdt_probe(struct platform_device *dev)
{
- struct mv64x60_wdt_pdata *pdata = dev->dev.platform_data;
+ struct mv64x60_wdt_pdata *pdata = dev_get_platdata(&dev->dev);
struct resource *r;
int timeout = 10;
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index af88ffd..7b79ca0 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -205,7 +205,7 @@ static const struct watchdog_ops omap_wdt_ops = {
static int omap_wdt_probe(struct platform_device *pdev)
{
- struct omap_wd_timer_platform_data *pdata = pdev->dev.platform_data;
+ struct omap_wd_timer_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct watchdog_device *omap_wdt;
struct resource *res, *mem;
struct omap_wdt_dev *wdev;
diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c
index b0f116c..8d5facd 100644
--- a/drivers/watchdog/rdc321x_wdt.c
+++ b/drivers/watchdog/rdc321x_wdt.c
@@ -231,7 +231,7 @@ static int rdc321x_wdt_probe(struct platform_device *pdev)
struct resource *r;
struct rdc321x_wdt_pdata *pdata;
- pdata = pdev->dev.platform_data;
+ pdata = dev_get_platdata(&pdev->dev);
if (!pdata) {
dev_err(&pdev->dev, "no platform data supplied\n");
return -ENODEV;
diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c
index c97e98d..7bf8c50 100644
--- a/drivers/watchdog/stmp3xxx_rtc_wdt.c
+++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c
@@ -30,7 +30,7 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat period in seconds from 1 to "
static int wdt_start(struct watchdog_device *wdd)
{
struct device *dev = watchdog_get_drvdata(wdd);
- struct stmp3xxx_wdt_pdata *pdata = dev->platform_data;
+ struct stmp3xxx_wdt_pdata *pdata = dev_get_platdata(dev);
pdata->wdt_set_timeout(dev->parent, wdd->timeout * WDOG_TICK_RATE);
return 0;
@@ -39,7 +39,7 @@ static int wdt_start(struct watchdog_device *wdd)
static int wdt_stop(struct watchdog_device *wdd)
{
struct device *dev = watchdog_get_drvdata(wdd);
- struct stmp3xxx_wdt_pdata *pdata = dev->platform_data;
+ struct stmp3xxx_wdt_pdata *pdata = dev_get_platdata(dev);
pdata->wdt_set_timeout(dev->parent, 0);
return 0;
diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
index a614d84..d9af934 100644
--- a/drivers/watchdog/ux500_wdt.c
+++ b/drivers/watchdog/ux500_wdt.c
@@ -88,7 +88,7 @@ static struct watchdog_device ux500_wdt = {
static int ux500_wdt_probe(struct platform_device *pdev)
{
int ret;
- struct ux500_wdt_data *pdata = pdev->dev.platform_data;
+ struct ux500_wdt_data *pdata = dev_get_platdata(&pdev->dev);
if (pdata) {
if (pdata->timeout > 0)
diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
index d4e47ed..e243bd0 100644
--- a/drivers/watchdog/wm831x_wdt.c
+++ b/drivers/watchdog/wm831x_wdt.c
@@ -184,7 +184,7 @@ static const struct watchdog_ops wm831x_wdt_ops = {
static int wm831x_wdt_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
- struct wm831x_pdata *chip_pdata;
+ struct wm831x_pdata *chip_pdata = dev_get_platdata(pdev->dev.parent);
struct wm831x_watchdog_pdata *pdata;
struct wm831x_wdt_drvdata *driver_data;
struct watchdog_device *wm831x_wdt;
@@ -231,12 +231,10 @@ static int wm831x_wdt_probe(struct platform_device *pdev)
wm831x_wdt->timeout = wm831x_wdt_cfgs[i].time;
/* Apply any configuration */
- if (pdev->dev.parent->platform_data) {
- chip_pdata = pdev->dev.parent->platform_data;
+ if (chip_pdata)
pdata = chip_pdata->watchdog;
- } else {
+ else
pdata = NULL;
- }
if (pdata) {
reg &= ~(WM831X_WDOG_SECACT_MASK | WM831X_WDOG_PRIMACT_MASK |
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [V2,03/35] watchdog: use dev_get_platdata()
2013-07-30 10:58 [PATCH V2 03/35] watchdog: use dev_get_platdata() Jingoo Han
@ 2013-10-01 15:52 ` Guenter Roeck
2013-10-29 7:37 ` [PATCH V2 03/35] " Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2013-10-01 15:52 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Andrew Morton', linux-kernel, 'Wim Van Sebroeck',
linux-watchdog
On Tue, Jul 30, 2013 at 06:58:51PM -0000, Jingoo Han wrote:
> Use the wrapper function for retrieving the platform data instead of
> accessing dev->platform_data directly.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 03/35] watchdog: use dev_get_platdata()
2013-07-30 10:58 [PATCH V2 03/35] watchdog: use dev_get_platdata() Jingoo Han
2013-10-01 15:52 ` [V2,03/35] " Guenter Roeck
@ 2013-10-29 7:37 ` Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2013-10-29 7:37 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Andrew Morton',
linux-kernel, linux-watchdog, 'Guenter Roeck'
Hi Jingoo,
> Use the wrapper function for retrieving the platform data instead of
> accessing dev->platform_data directly.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 +-
> drivers/watchdog/mv64x60_wdt.c | 2 +-
> drivers/watchdog/omap_wdt.c | 2 +-
> drivers/watchdog/rdc321x_wdt.c | 2 +-
> drivers/watchdog/stmp3xxx_rtc_wdt.c | 4 ++--
> drivers/watchdog/ux500_wdt.c | 2 +-
> drivers/watchdog/wm831x_wdt.c | 8 +++-----
> 7 files changed, 10 insertions(+), 12 deletions(-)
This patch has been added to linux-watchdog-next.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-29 7:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-30 10:58 [PATCH V2 03/35] watchdog: use dev_get_platdata() Jingoo Han
2013-10-01 15:52 ` [V2,03/35] " Guenter Roeck
2013-10-29 7:37 ` [PATCH V2 03/35] " Wim Van Sebroeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).