aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-02-12 08:34:35 -0500
committerWim Van Sebroeck <wim@iguana.be>2014-03-31 07:29:08 -0400
commitffb8eee4f140bbfc333381168d6fe1a7e7dc7af7 (patch)
treed295aeb1ce44c5af00ff5257d7fdb1c8a1ef8f7d
parentf06cdfd184d845e1f01df7f636c0e3b5c5cc8d18 (diff)
watchdog: xilinx: Move no_timeout to probe function
no_timeout should be local variable because it is used only in probe function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r--drivers/watchdog/of_xilinx_wdt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
index 39e61e15f723..3bc648f40e1f 100644
--- a/drivers/watchdog/of_xilinx_wdt.c
+++ b/drivers/watchdog/of_xilinx_wdt.c
@@ -51,7 +51,6 @@ struct xwdt_device {
51static struct xwdt_device xdev; 51static struct xwdt_device xdev;
52 52
53static u32 timeout; 53static u32 timeout;
54static u8 no_timeout;
55 54
56static DEFINE_SPINLOCK(spinlock); 55static DEFINE_SPINLOCK(spinlock);
57 56
@@ -159,8 +158,7 @@ static int xwdt_probe(struct platform_device *pdev)
159 u32 *tmptr; 158 u32 *tmptr;
160 u32 *pfreq; 159 u32 *pfreq;
161 struct resource *res; 160 struct resource *res;
162 161 bool no_timeout = false;
163 no_timeout = 0;
164 162
165 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 163 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
166 xdev.base = devm_ioremap_resource(&pdev->dev, res); 164 xdev.base = devm_ioremap_resource(&pdev->dev, res);
@@ -172,14 +170,14 @@ static int xwdt_probe(struct platform_device *pdev)
172 170
173 if (pfreq == NULL) { 171 if (pfreq == NULL) {
174 pr_warn("The watchdog clock frequency cannot be obtained!\n"); 172 pr_warn("The watchdog clock frequency cannot be obtained!\n");
175 no_timeout = 1; 173 no_timeout = true;
176 } 174 }
177 175
178 tmptr = (u32 *)of_get_property(pdev->dev.of_node, 176 tmptr = (u32 *)of_get_property(pdev->dev.of_node,
179 "xlnx,wdt-interval", NULL); 177 "xlnx,wdt-interval", NULL);
180 if (tmptr == NULL) { 178 if (tmptr == NULL) {
181 pr_warn("Parameter \"xlnx,wdt-interval\" not found in device tree!\n"); 179 pr_warn("Parameter \"xlnx,wdt-interval\" not found in device tree!\n");
182 no_timeout = 1; 180 no_timeout = true;
183 } else { 181 } else {
184 xdev.wdt_interval = *tmptr; 182 xdev.wdt_interval = *tmptr;
185 } 183 }