aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-01-14 11:39:07 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-02 13:11:25 -0500
commit6960cd465e553c8c0f9c26663b32bf3f3cd6a298 (patch)
treeba1ca5a950ad62f054f17018f0597f0e9b03a271 /drivers/tty
parentc0b18db0562738eee578b7cd2291bd2851f6b5f8 (diff)
serial: mxs-auart: Remove irq from private structure
The irq number is only used inside the probe function, so there is no need to keep it in the private mxs_auart_port structure. Use a local 'irq' variable for storing the irq number instead. Also make its type of 'int' as platform_get_irq() may fail and return a negative number. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mxs-auart.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 1e9fb370600b..767fddaa7576 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -152,8 +152,6 @@ struct mxs_auart_port {
152 unsigned int mctrl_prev; 152 unsigned int mctrl_prev;
153 enum mxs_auart_type devtype; 153 enum mxs_auart_type devtype;
154 154
155 unsigned int irq;
156
157 struct clk *clk; 155 struct clk *clk;
158 struct device *dev; 156 struct device *dev;
159 157
@@ -1228,7 +1226,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
1228 of_match_device(mxs_auart_dt_ids, &pdev->dev); 1226 of_match_device(mxs_auart_dt_ids, &pdev->dev);
1229 struct mxs_auart_port *s; 1227 struct mxs_auart_port *s;
1230 u32 version; 1228 u32 version;
1231 int ret = 0; 1229 int ret = 0, irq;
1232 struct resource *r; 1230 struct resource *r;
1233 1231
1234 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL); 1232 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
@@ -1266,9 +1264,9 @@ static int mxs_auart_probe(struct platform_device *pdev)
1266 1264
1267 s->mctrl_prev = 0; 1265 s->mctrl_prev = 0;
1268 1266
1269 s->irq = platform_get_irq(pdev, 0); 1267 irq = platform_get_irq(pdev, 0);
1270 s->port.irq = s->irq; 1268 s->port.irq = irq;
1271 ret = devm_request_irq(&pdev->dev, s->irq, mxs_auart_irq_handle, 0, 1269 ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0,
1272 dev_name(&pdev->dev), s); 1270 dev_name(&pdev->dev), s);
1273 if (ret) 1271 if (ret)
1274 return ret; 1272 return ret;