Skip to contentSkip to conversation

watchdog: rt2880_wdt: Remove assignment of dev pointer

PATCH In review Matt Redfearn 3 participants 3 messages Sep 12, 2016 – Oct 8, 2016 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: rt2880_wdt: Remove assignment of dev pointer

Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from struct watchdog_device") removed the dev pointer from struct watchdog_device, but this driver was still assigning it, leading to a compilation error:

drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’:
drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’ has no member named ‘dev’

  rt288x_wdt_dev.dev = &pdev->dev;
                ^

scripts/Makefile.build:289: recipe for target
'drivers/watchdog/rt2880_wdt.o' failed

Fix this by removing the assignment.

Fixes 0254e953537c

---

 drivers/watchdog/rt2880_wdt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/watchdog/rt2880_wdt.c +0 -1
index 1967919ae743..14b4fd428fff 100644
@@ -158,7 +158,6 @@ static int rt288x_wdt_probe(struct platform_device *pdev)
 
 	rt288x_wdt_freq = clk_get_rate(rt288x_wdt_clk) / RALINK_WDT_PRESCALE;
 
-	rt288x_wdt_dev.dev = &pdev->dev;
 	rt288x_wdt_dev.bootstatus = rt288x_wdt_bootcause();
 	rt288x_wdt_dev.max_timeout = (0xfffful / rt288x_wdt_freq);
 	rt288x_wdt_dev.parent = &pdev->dev;
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Matt Redfearn

Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from struct watchdog_device") removed the dev pointer from struct watchdog_device, but this driver was still assigning it, leading to a compilation error:

drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’:
drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’ has no member named ‘dev’

Quoted 8 lines
  rt288x_wdt_dev.dev = &pdev->dev;
                ^

scripts/Makefile.build:289: recipe for target
'drivers/watchdog/rt2880_wdt.o' failed

Fix this by removing the assignment.

Fixes 0254e953537c
Fixes 0254e953537c ("watchdog: Drop pointer to watchdog device ...")
Quoted 1 line
Quoted 18 lines

---

 drivers/watchdog/rt2880_wdt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/watchdog/rt2880_wdt.c +0 -1
index 1967919ae743..14b4fd428fff 100644
@@ -158,7 +158,6 @@ static int rt288x_wdt_probe(struct platform_device *pdev)
 
 	rt288x_wdt_freq = clk_get_rate(rt288x_wdt_clk) / RALINK_WDT_PRESCALE;
 
-	rt288x_wdt_dev.dev = &pdev->dev;
 	rt288x_wdt_dev.bootstatus = rt288x_wdt_bootcause();
 	rt288x_wdt_dev.max_timeout = (0xfffful / rt288x_wdt_freq);
 	rt288x_wdt_dev.parent = &pdev->dev;
#2 lore raw
In reply to Matt Redfearn

Hi Matt,

Quoted 10 lines

Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from struct watchdog_device") removed the dev pointer from struct watchdog_device, but this driver was still assigning it, leading to a compilation error:

drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’:
drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’ has no member named ‘dev’

  rt288x_wdt_dev.dev = &pdev->dev;
                ^
Quoted 8 lines

scripts/Makefile.build:289: recipe for target
'drivers/watchdog/rt2880_wdt.o' failed

Fix this by removing the assignment.

Fixes 0254e953537c

---

This patch and a similar patch from Guenter regarding mt7621_wdt was added to linux-watchdog-next almost 2 weeks ago.

Kind regards,
Wim.