i2c: busses: i2c-ocores: switch to devm_request_and_ioremap
Subsystems (2)
PATCH 2/2 i2c: busses: i2c-ocores: switch to devm_request_and_ioremap
This drops a few lines of code and allows common APIs to handle those for us.
---
drivers/i2c/busses/i2c-ocores.c +2 -11
@@ -283,18 +283,9 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)if (!i2c)return -ENOMEM ; -if (!devm_request_mem_region (&pdev->dev, res->start, -resource_size (res), pdev->name)) { -dev_err (&pdev->dev,"Memory region busy\n" ); + i2c->base =devm_request_and_ioremap (&pdev->dev, res); +if (!i2c->base)return -EBUSY ; - } - - i2c->base =devm_ioremap_nocache (&pdev->dev, res->start, -resource_size (res)); -if (!i2c->base) { -dev_err (&pdev->dev,"Unable to map registers\n" ); -return -EIO ; - } pdata = pdev->dev.platform_data;if (pdata) {
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxin" == Maxin B John <[email protected]> writes:
Maxin> This drops a few lines of code and allows common APIs to handle Maxin> those for us.
Maxin> Signed-off-by: Maxin B. John <[email protected]>
Signature · 1 line
Bye, Peter Korsgaard
Hi Peter,
Quoted 8 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxin" == Maxin B John <[email protected]> writes:
Maxin> This drops a few lines of code and allows common APIs to handle Maxin> those for us.
Maxin> Signed-off-by: Maxin B. John <[email protected]>
Is there any update on this ?
Quoted 2 lines
--
Bye, Peter Korsgaard
Best Regards,
Maxin B. John
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxin" == Maxin B John <[email protected]> writes:
Maxin> Hi Peter,
Maxin> This drops a few lines of code and allows common APIs to handle Maxin> those for us.
Maxin> Signed-off-by: Maxin B. John <[email protected]>
Quoted 1 line
Quoted 1 line
Maxin> Is there any update on this ?
I'm expecting Wolfram to pick it up.
Signature · 1 line
Bye, Peter Korsgaard
Quoted 3 lines · Maxin B. John
This drops a few lines of code and allows common APIs to handle those for us.
Signed-off-by Maxin B. John <[email protected]>
Thanks, I just applied a very similar patch by Thierry Reding which was sent earlier.
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |