Skip to contentSkip to conversation

mpc8xxx_wdt: fix build

PATCH In review Peter Korsgaard 3 participants 3 messages Mar 30, 2011 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc8xxx_wdt: fix build

Since 1c48a5c93da6313 (dt: Eliminate of_platform_{,un}register_driver) mpc8xxx_wdt no longer builds as it tries to refer to a 'match' variable rather than ofdev->dev.of_match that it checks just before.

---
 drivers/watchdog/mpc8xxx_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/mpc8xxx_wdt.c +1 -1
index 6709d72..528bceb 100644
@@ -195,7 +195,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
 
 	if (!ofdev->dev.of_match)
 		return -EINVAL;
-	wdt_type = match->data;
+	wdt_type = ofdev->dev.of_match->data;
 
 	if (!freq || freq == -1)
 		return -EINVAL;
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Peter Korsgaard

Since 1c48a5c93da6313 (dt: Eliminate of_platform_{,un}register_driver) mpc8xxx_wdt no longer builds as it tries to refer to a 'match' variable rather than ofdev->dev.of_match that it checks just before.

Quoted 20 lines
---
 drivers/watchdog/mpc8xxx_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/mpc8xxx_wdt.c +1 -1
index 6709d72..528bceb 100644
@@ -195,7 +195,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
 
 	if (!ofdev->dev.of_match)
 		return -EINVAL;
-	wdt_type = match->data;
+	wdt_type = ofdev->dev.of_match->data;
 
 	if (!freq || freq == -1)
 		return -EINVAL;
Signature · 1 line
1.7.2.3
#2 lore raw

Hi Peter, Grant,

Quoted 8 lines · Peter Korsgaard
Quoted 5 lines

Since 1c48a5c93da6313 (dt: Eliminate of_platform_{,un}register_driver) mpc8xxx_wdt no longer builds as it tries to refer to a 'match' variable rather than ofdev->dev.of_match that it checks just before.

I added it to linux-2.6-watchdog-next.
it will go upstream after the weekend.

Kind regards,
Wim.