Re: [PATCH 2/2] ar7_wdt: convert to become a platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Florian,

> > > > From: Florian Fainelli <florian@xxxxxxxxxxx>
> > > > Subject: [PATCH 2/2 v2] ar7_wdt: convert to become a platform driver
> > > >
> > > > This patch converts the ar7_wdt driver to become
> > > > a platform driver. The AR7 SoC specific identification
> > > > and base register calculation is performed by the board
> > > > code, therefore we no longer need to have access to
> > > > ar7_chip_id. We also remove the reboot notifier code to
> > > > use the platform shutdown method as Wim suggested.
> > > >
> > > > Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx>
> > > > Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxx>
> > >
> > > Any news on this patch ?
> >
> > This one was ok for me. I think we agreed that Ralf would take it up in his
> > tree. I can also take it up in my next tree still.
> 
> Oh, I did not understand that sorry, I thought Ralf would take the first one 
> which is MIPS-specific.

I added the second patch to my tree, but saw that the error handling on probe could be improved.
Can you test attached patch?

Thanks in advance,
Wim.

diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c
index 82855b0..2e94b71 100644
--- a/drivers/watchdog/ar7_wdt.c
+++ b/drivers/watchdog/ar7_wdt.c
@@ -295,7 +295,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
 	if (!ar7_wdt) {
 		printk(KERN_ERR DRVNAME ": could not ioremap registers\n");
 		rc = -ENXIO;
-		goto out;
+		goto out_mem_region;
 	}
 
 	ar7_wdt_disable_wdt();
@@ -311,6 +311,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev)
 
 out_alloc:
 	iounmap(ar7_wdt);
+out_mem_region:
 	release_mem_region(ar7_regs_wdt->start, resource_size(ar7_regs_wdt));
 out:
 	return rc;

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux