Re: [PATCH v2 3/3] i2c: xilinx: Use devm_* functions

From: Wolfram Sang
Date: Fri Oct 04 2013 - 01:33:32 EST



> + i2c->base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(i2c->base)) {
> + dev_err(&pdev->dev, "Could not allocate iomem\n");

devm_ioremap_resource already prints error messages.

> + ret = devm_request_irq(&pdev->dev, irq, xiic_isr, 0, pdev->name, i2c);

This is too early. Can you find out why?

> + pdata = (struct xiic_i2c_platform_data *)dev_get_platdata(&pdev->dev);

Casting a void pointer?

Attachment: signature.asc
Description: Digital signature