From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753959AbcADM2R (ORCPT ); Mon, 4 Jan 2016 07:28:17 -0500 Received: from lists.s-osg.org ([54.187.51.154]:54750 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753645AbcADM0f (ORCPT ); Mon, 4 Jan 2016 07:26:35 -0500 From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, Mauro Carvalho Chehab , Enrico Butera , Sakari Ailus , Enric Balletbo i Serra , Rob Herring , Eduard Gavin , Laurent Pinchart , Hans Verkuil , linux-media@vger.kernel.org, Javier Martinez Canillas Subject: [PATCH 08/10] [media] tvp5150: Add OF match table Date: Mon, 4 Jan 2016 09:25:30 -0300 Message-Id: <1451910332-23385-9-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1451910332-23385-1-git-send-email-javier@osg.samsung.com> References: <1451910332-23385-1-git-send-email-javier@osg.samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eduard Gavin The Documentation/devicetree/bindings/media/i2c/tvp5150.txt DT binding doc lists "ti,tvp5150" as the device compatible string but the driver does not have an OF match table. Add the table to the driver so the I2C core can do an OF style match. Signed-off-by: Eduard Gavin Signed-off-by: Javier Martinez Canillas --- drivers/media/i2c/tvp5150.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 105bd1c6b17f..caac96a577f8 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1295,8 +1295,17 @@ static const struct i2c_device_id tvp5150_id[] = { }; MODULE_DEVICE_TABLE(i2c, tvp5150_id); +#if IS_ENABLED(CONFIG_OF) +static const struct of_device_id tvp5150_of_match[] = { + { .compatible = "ti,tvp5150", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, tvp5150_of_match); +#endif + static struct i2c_driver tvp5150_driver = { .driver = { + .of_match_table = of_match_ptr(tvp5150_of_match), .name = "tvp5150", }, .probe = tvp5150_probe, -- 2.4.3