From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754092AbbAGQgR (ORCPT ); Wed, 7 Jan 2015 11:36:17 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:39879 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753180AbbAGQgP (ORCPT ); Wed, 7 Jan 2015 11:36:15 -0500 Message-ID: <54AD6078.80506@pengutronix.de> Date: Wed, 07 Jan 2015 17:36:08 +0100 From: Marc Kleine-Budde User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: =?UTF-8?B?U8O2cmVuIEJyaW5rbWFubg==?= CC: Kedareswara rao Appana , wg@grandegger.com, michal.simek@xilinx.com, grant.likely@linaro.org, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kedareswara rao Appana Subject: Re: [PATCH v4] can: Convert to runtime_pm References: <58f37b6fd9104ce185c413c473fe047b@BY2FFO11FD050.protection.gbl> <54AD267C.4060004@pengutronix.de> <54AD5F13.1020107@pengutronix.de> <1d3216d75e9d494fb68ce9a3b24e7ca3@BL2FFO11FD017.protection.gbl> In-Reply-To: <1d3216d75e9d494fb68ce9a3b24e7ca3@BL2FFO11FD017.protection.gbl> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R95cRwpVO2ie2gjCTulG8FpOL2W3F089U" X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R95cRwpVO2ie2gjCTulG8FpOL2W3F089U Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/07/2015 05:32 PM, S=C3=B6ren Brinkmann wrote: > On Wed, 2015-01-07 at 05:30PM +0100, Marc Kleine-Budde wrote: >> On 01/07/2015 04:58 PM, S=C3=B6ren Brinkmann wrote: >>>> I think you have to convert the _remove() function, too. Have a look= at >>>> the gpio-zynq.c driver: >>>> >>>>> static int zynq_gpio_remove(struct platform_device *pdev) >>>>> { >>>>> struct zynq_gpio *gpio =3D platform_get_drvdata(pdev); >>>>> >>>>> pm_runtime_get_sync(&pdev->dev); >>>> >>>> However I don't understand why the get_sync() is here. Maybe S=C3=B6= ren can help? >>> >>> IIRC, the concern was that the remove function may be called while th= e device is >>> runtime suspended. Hence the remove function needs to resume the devi= ce since the >>> remove function may access the HW. >> >> What about the corresponding runtime_put()? Would some counter be >> unbalanced upon device removal? >=20 > Aren't those counters destroyed with module unloading? I don't know. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --R95cRwpVO2ie2gjCTulG8FpOL2W3F089U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUrWB4AAoJECte4hHFiupU90oP/RO4Afg8tuWj6Z4WpiVbiUuB DzCdhK+otWYLqyPqVRkCezA5Q2Q8RfDSuQOTaqhzYljqv70h1/DFwWMmyeUfhc8X 067m+aXmgXJPD7G4Xr4K6/zgBqE1oI1zQmbBg57Ze2pRgkkZrNw5P/N7rncxnMvr nFKKmuDmaDpOPz0Ap0R8tbwpiMchbAZcXJNJwum/3TRttDUPdMAK9Hq/EzZfZk4F 91jyKGaXew3sSskgr1HIEbIH8R/k1mFU5EZOh+xMuw5QFYQ+tak+N7lOEOPOYte9 +yvOS5/I58EqOwLFjZnOAMTffncPyU6iTota6NzXJClbGvUcpOKXV+IDW3a8CFt/ U6diBVRK9bU6uW25SEllc+OXvkOgHCCu3B0/oMCK/R8BaKgfnOzz7EISJB2vYce8 MvMDQqvFXkBkEVxdmv8HaBwAFTFUP5KmPIh4FfzFLLZ+LkjZZ/oZSe3PzvLxLBbj amclgdCQApmGu59Cvi+wy+u74928Q3Ql2Q+jNCHtfWGf2Ao1MpDPyZ23cxMyOrrN 5PF/TgPXSyxrNtsQwRy8QkgO9i+eW3AQsixama/HoC2zOxvusqH3DuKij9soZDNa kQ2i8HLDuZvD0FFOZVLMwl/oPTArQJzBfbKM8cmL5lHdwIdHXzp4x40VmDUYciX3 yK9pcttT976Jr5VSlXAa =7KiB -----END PGP SIGNATURE----- --R95cRwpVO2ie2gjCTulG8FpOL2W3F089U--