From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH v6 3/9] mfd: axp20x: use dev->driver->of_match_table in axp20x_match_device() Date: Mon, 11 Jan 2016 09:25:53 +0000 Message-ID: <20160111092553.GM14104@x1> References: <1450283538-25067-1-git-send-email-wens@csie.org> <1450283538-25067-4-git-send-email-wens@csie.org> Reply-To: lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1450283538-25067-4-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Maxime Ripard , Chen-Yu Tsai , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Hans de Goede , Mark Brown , Andy Shevchenko , Rob Herring List-Id: devicetree@vger.kernel.org On Thu, 17 Dec 2015, Chen-Yu Tsai wrote: > In axp20x_match_device(), match the of_device_id table bound to the > device driver instead of pointing to axp20x_of_match directly. This > will allow us to keep axp20x_match_device() unmodified when we expand > the axp20x driver into multiple ones covering different interface > types. >=20 > of_device_get_match_data() cannot be used here as we need to know if > it failed to get a match, or if the match data value just happened to > be 0, as it is for the AXP152. >=20 > Signed-off-by: Chen-Yu Tsai > --- > drivers/mfd/axp20x.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Lee Jones > diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c > index 685a78614f83..3e186f2dcac3 100644 > --- a/drivers/mfd/axp20x.c > +++ b/drivers/mfd/axp20x.c > @@ -613,7 +613,7 @@ static int axp20x_match_device(struct axp20x_dev *axp= 20x) > const struct of_device_id *of_id; > =20 > if (dev->of_node) { > - of_id =3D of_match_device(axp20x_of_match, dev); > + of_id =3D of_match_device(dev->driver->of_match_table, dev); > if (!of_id) { > dev_err(dev, "Unable to match OF ID\n"); > return -ENODEV; --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.