[alsa-devel] [PATCH 1/15] sound/soc/mxs/mxs-saif.c: add missing iounmap

Julia Lawall julia.lawall at lip6.fr
Thu Jan 26 12:21:35 CET 2012


On Thu, 26 Jan 2012, Wolfram Sang wrote:

>> @@ -666,18 +666,19 @@ static int mxs_saif_probe(struct platform_device *pdev)
>>   		goto failed_get_resource;
>>   	}
>>
>> -	if (!request_mem_region(iores->start, resource_size(iores),
>> -				"mxs-saif")) {
>> +	if (!devm_request_mem_region(&pdev->dev, iores->start,
>> +				     resource_size(iores), "mxs-saif")) {
>>   		dev_err(&pdev->dev, "request_mem_region failed\n");
>>   		ret = -EBUSY;
>>   		goto failed_get_resource;
>>   	}
>>
>> -	saif->base = ioremap(iores->start, resource_size(iores));
>> +	saif->base = devm_ioremap(&pdev->dev, iores->start,
>> +				  resource_size(iores));
>
> devm_request_and_ioremap() to save even more code?

I didn't do that because apparently it is not yet in a release?  I have 
another for introducing those...

julia


More information about the Alsa-devel mailing list