From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752755AbdK0PfG (ORCPT ); Mon, 27 Nov 2017 10:35:06 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:60985 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752291AbdK0PfE (ORCPT ); Mon, 27 Nov 2017 10:35:04 -0500 Date: Mon, 27 Nov 2017 16:35:02 +0100 From: Maxime Ripard To: Stefan =?iso-8859-1?Q?Br=FCns?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Arnd Bergmann , Chen-Yu Tsai , stable Subject: Re: [PATCH] sunxi-rsb: Include OF based modalias in device uevent Message-ID: <20171127153502.4wcqtimppgpfklmr@flea.home> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yfcegsoheh44czmg" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yfcegsoheh44czmg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Nov 27, 2017 at 01:17:25PM +0100, Stefan Br=FCns wrote: > Include the OF-based modalias in the uevent sent when registering devices > on the sunxi RSB bus, so that user space has a chance to autoload the > kernel module for the device. >=20 > Fixes a regression caused by commit 3f241bfa60bd ("arm64: allwinner: a64: > pine64: Use dcdc1 regulator for mmc0"). When the axp20x-rsb module for > the AXP803 PMIC is built as a module, it is not loaded and the system > ends up with an disfunctional MMC controller. >=20 > Cc: stable > Signed-off-by: Stefan Br=FCns > --- > drivers/bus/sunxi-rsb.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c > index 328ca93781cf..37cb57244cbe 100644 > --- a/drivers/bus/sunxi-rsb.c > +++ b/drivers/bus/sunxi-rsb.c > @@ -173,11 +173,24 @@ static int sunxi_rsb_device_remove(struct device *d= ev) > return drv->remove(to_sunxi_rsb_device(dev)); > } > =20 > +static int sunxi_rsb_device_uevent(struct device *dev, > + struct kobj_uevent_env *env) > +{ > + int ret; > + > + ret =3D of_device_uevent_modalias(dev, env); > + if (ret !=3D -ENODEV) > + return ret; A comment explaining why we need to ignore the ENODEV error code would be great here. > + return 0; > +} > + > static struct bus_type sunxi_rsb_bus =3D { > .name =3D RSB_CTRL_NAME, > .match =3D sunxi_rsb_device_match, > .probe =3D sunxi_rsb_device_probe, > .remove =3D sunxi_rsb_device_remove, > + .uevent =3D sunxi_rsb_device_uevent, Any reason to not use of_device_uevent_modalias directly here? Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --yfcegsoheh44czmg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlocMKIACgkQ0rTAlCFN r3SE9A//bxr47upk2qJVetXOUiXPZsNJDW2SOri/1tn7svIL7gQi5Vyewy1PAQRx EnkaMNG3pA0kB7HxBg2j/Dwuip01OagVGl0vnCjvF/mPemF6UBdju9lqUe0nCIhT iLdA4E9yieRawR06IFTeVZn81a9NoH9zR6fTyN2zxW3iDIYXyv3fPMjV8C7NoVe9 sC6gWw/UN1DntGTC8zChkshwAQOo/TrIUrVUqWId5j9yGWDcaAZGgnvZYvP15r2v IgBQqIXWqPye103tqNhBFj8441EkczjH2C57Gqf+PG2phrJV+64jsYagmd/IIeZm E103hA6/B/g6zEW4QBjI6F1+0zL9aV9/7nAFQlE/WDrDxD1Syo4s+U7OMCimbct8 cUMMGX3XeyHjZ+X4uaCydYH126omY0vT8pRlxj2nb1rVfeb98Ftx7hEdTqCJSkmi jlIafVUjCRqYpVa378GLEgv4LtWc8zjYDQukkfTZsS0TkghFMfFCWxrczLMmJjmf V3340CQ37epHmDRF6VBpqFgNAslwd9+DzlQ0THXipXacgK7xRFznkVUxGO+SI8AW xwgfWjSWMKOBakqHDaHOmIue74T0rQmQQrIwQ2ufwt07rsYLQc+Av2J7Ji+Gy4WQ FjPxox4PCNXk18gr4t9RTdl0Db0x31osepFxTiMk64BvLUBulZA= =TVj7 -----END PGP SIGNATURE----- --yfcegsoheh44czmg--