[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1385725170-31515-1-git-send-email-shc_work@mail.ru>
Date: Fri, 29 Nov 2013 15:39:28 +0400
From: Alexander Shiyan <shc_work@...l.ru>
To: linux-kernel@...r.kernel.org
Cc: Evgeniy Polyakov <zbr@...emap.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shawn Guo <shawn.guo@...aro.org>,
Sascha Hauer <kernel@...gutronix.de>,
Alexander Shiyan <shc_work@...l.ru>
Subject: [PATCH 1/3] w1: mxc_w1: Remove unused field "clkdiv" from private structure
Private field "clkdiv" is not used outside "probe", so there are
no reason to keep it in driver.
Signed-off-by: Alexander Shiyan <shc_work@...l.ru>
---
drivers/w1/masters/mxc_w1.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
index 15c7251..5de3ca9 100644
--- a/drivers/w1/masters/mxc_w1.c
+++ b/drivers/w1/masters/mxc_w1.c
@@ -46,7 +46,6 @@
struct mxc_w1_device {
void __iomem *regs;
- unsigned int clkdiv;
struct clk *clk;
struct w1_bus_master bus_master;
};
@@ -107,6 +106,7 @@ static int mxc_w1_probe(struct platform_device *pdev)
{
struct mxc_w1_device *mdev;
struct resource *res;
+ unsigned int clkdiv;
int err = 0;
mdev = devm_kzalloc(&pdev->dev, sizeof(struct mxc_w1_device),
@@ -118,7 +118,7 @@ static int mxc_w1_probe(struct platform_device *pdev)
if (IS_ERR(mdev->clk))
return PTR_ERR(mdev->clk);
- mdev->clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1;
+ clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mdev->regs = devm_ioremap_resource(&pdev->dev, res);
@@ -126,7 +126,7 @@ static int mxc_w1_probe(struct platform_device *pdev)
return PTR_ERR(mdev->regs);
clk_prepare_enable(mdev->clk);
- __raw_writeb(mdev->clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER);
+ __raw_writeb(clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER);
mdev->bus_master.data = mdev;
mdev->bus_master.reset_bus = mxc_w1_ds2_reset_bus;
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists