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>
This commit is contained in:
parent
c0b18db056
commit
6960cd465e
1 changed files with 4 additions and 6 deletions
|
@ -152,8 +152,6 @@ struct mxs_auart_port {
|
||||||
unsigned int mctrl_prev;
|
unsigned int mctrl_prev;
|
||||||
enum mxs_auart_type devtype;
|
enum mxs_auart_type devtype;
|
||||||
|
|
||||||
unsigned int irq;
|
|
||||||
|
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
|
@ -1228,7 +1226,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
|
||||||
of_match_device(mxs_auart_dt_ids, &pdev->dev);
|
of_match_device(mxs_auart_dt_ids, &pdev->dev);
|
||||||
struct mxs_auart_port *s;
|
struct mxs_auart_port *s;
|
||||||
u32 version;
|
u32 version;
|
||||||
int ret = 0;
|
int ret = 0, irq;
|
||||||
struct resource *r;
|
struct resource *r;
|
||||||
|
|
||||||
s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
|
s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
|
||||||
|
@ -1266,9 +1264,9 @@ static int mxs_auart_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
s->mctrl_prev = 0;
|
s->mctrl_prev = 0;
|
||||||
|
|
||||||
s->irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
s->port.irq = s->irq;
|
s->port.irq = irq;
|
||||||
ret = devm_request_irq(&pdev->dev, s->irq, mxs_auart_irq_handle, 0,
|
ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0,
|
||||||
dev_name(&pdev->dev), s);
|
dev_name(&pdev->dev), s);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue