From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH 1/15] sound/soc/mxs/mxs-saif.c: add missing iounmap Date: Thu, 26 Jan 2012 14:51:35 +0100 Message-ID: <20120126135135.GD2611@pengutronix.de> References: <1326362117-29371-1-git-send-email-Julia.Lawall@lip6.fr> <7FE21149F4667147B645348EC605788508FBDB@039-SN2MPN1-013.039d.mgd.msft.net> <20120124202203.GD1135@opensource.wolfsonmicro.com> <20120126110506.GB2611@pengutronix.de> <20120126112242.GA9401@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1673033077979215154==" Return-path: Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by alsa0.perex.cz (Postfix) with ESMTP id 2D96D103819 for ; Thu, 26 Jan 2012 14:51:38 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Julia Lawall Cc: "alsa-devel@alsa-project.org" , Takashi Iwai , Mark Brown , "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dong Aisheng-B29396 , Liam Girdwood List-Id: alsa-devel@alsa-project.org --===============1673033077979215154== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6WlEvdN9Dv0WHSBl" Content-Disposition: inline --6WlEvdN9Dv0WHSBl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Julia, > iores =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); > @@ -663,18 +663,11 @@ static int mxs_saif_probe(struct platform_device *p= dev) > goto failed_get_resource; > } >=20 > - if (!request_mem_region(iores->start, resource_size(iores), > - "mxs-saif")) { > - dev_err(&pdev->dev, "request_mem_region failed\n"); > - ret =3D -EBUSY; > - goto failed_get_resource; > - } > - > - saif->base =3D ioremap(iores->start, resource_size(iores)); > + saif->base =3D devm_request_and_ioremap(&pdev->dev, iores); You can skip checking 'iores', too. I also did that in the example, but a lot of people seem to miss it. Where did you get the information how to use devm_request_and_ioremap? I probably need to spread the word even more... Thanks, Wolfram --=20 Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | --6WlEvdN9Dv0WHSBl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk8hWmcACgkQD27XaX1/VRtTswCeLgDt7EjSmhNRcozYM9Rs94KA 8cUAn2Y7txHBqm6u85nuQ0rCT9o1lbYc =SnFJ -----END PGP SIGNATURE----- --6WlEvdN9Dv0WHSBl-- --===============1673033077979215154== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1673033077979215154==--