From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: Re: [PATCH 2/5] drm/i2c: adv7511: Initial support for adv7533 Date: Mon, 03 Aug 2015 11:09:50 +0530 Message-ID: <55BEFEA6.9090104@codeaurora.org> References: <1437977819-24199-1-git-send-email-architt@codeaurora.org> <1437977819-24199-3-git-send-email-architt@codeaurora.org> <20150728032737.GN4753@usrtlx11787.corpusers.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:60652 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbbHCFjz (ORCPT ); Mon, 3 Aug 2015 01:39:55 -0400 In-Reply-To: <20150728032737.GN4753@usrtlx11787.corpusers.net> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Bjorn Andersson Cc: dri-devel@lists.freedesktop.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, andy.green@linaro.org, srinivas.kandagatla@linaro.org, laurent.pinchart@ideasonboard.com On 07/28/2015 08:57 AM, Bjorn Andersson wrote: > On Sun 26 Jul 23:16 PDT 2015, Archit Taneja wrote: > >> From: Lars-Peter Clausen >> > [..] >> diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c > > [..] > >> >> +static const struct of_device_id adv7511_of_ids[] = { >> + { .compatible = "adi,adv7511", .data = (void *) ADV7511 }, >> + { .compatible = "adi,adv7511w", .data = (void *) ADV7511 }, >> + { .compatible = "adi,adv7513", .data = (void *) ADV7511 }, >> + { .compatible = "adi,adv7533", .data = (void *) ADV7533 }, >> + { } >> +}; >> +MODULE_DEVICE_TABLE(of, adv7511_of_ids); > > Please leave this at the bottom. > >> + >> static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) >> { >> struct adv7511_link_config link_config; >> @@ -871,9 +938,22 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) >> adv7511->powered = false; >> adv7511->status = connector_status_disconnected; >> >> - ret = adv7511_parse_dt(dev->of_node, &link_config); >> - if (ret) >> - return ret; >> + if (dev->of_node) { >> + const struct of_device_id *of_id; >> + >> + of_id = of_match_node(adv7511_of_ids, dev->of_node); > > If you use of_device_get_match_data() instead you don't need to move the > of_device_id table. Thanks, will use this in future revisions. Archit -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project