Re: [PATCH V2 11/17] i2c: nomadik: Convert to devm functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 13, 2014 at 03:09:02PM +0100, Ulf Hansson wrote:
> Use devm_* functions to simplify code and error handling.
> 
> Cc: Alessandro Rubini <rubini@xxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> ---
> 
> Changes in v2:
> 	Rebased on top of latest i2c-nomadik branch.

Since this depends on Linus' patch already, I think it would be cleaner
if I pick this kinda unrelated (but wanted) devm patch, and ack the
PM stuff. If this for some reason makes things more complicated, I can
also simply ack this one.

> -	dev->virtbase = ioremap(adev->res.start, resource_size(&adev->res));
> +	dev->virtbase = devm_ioremap(&adev->dev, adev->res.start,
> +				resource_size(&adev->res));
>  	if (!dev->virtbase) {
>  		ret = -ENOMEM;

IS_ERR()!

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux