From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750891AbdAWL3E (ORCPT ); Mon, 23 Jan 2017 06:29:04 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35269 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750703AbdAWL3D (ORCPT ); Mon, 23 Jan 2017 06:29:03 -0500 Date: Mon, 23 Jan 2017 11:32:01 +0000 From: Lee Jones To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Laxman Dewangan , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH 1/4] mfd: max77686: Don't attempt to get i2c_device_id .data Message-ID: <20170123113201.GA16020@dell> References: <1484228857-20182-1-git-send-email-javier@osg.samsung.com> <1484228857-20182-2-git-send-email-javier@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1484228857-20182-2-git-send-email-javier@osg.samsung.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Jan 2017, Javier Martinez Canillas wrote: > The driver is only used in platforms that have DT support so always the > I2C device .data will be get from the matched OF node and never will be > from the I2C device ID table. > > Signed-off-by: Javier Martinez Canillas > --- > > drivers/mfd/max77686.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c > index 7b68ed72e9cb..ddae3bf3e46c 100644 > --- a/drivers/mfd/max77686.c > +++ b/drivers/mfd/max77686.c > @@ -188,14 +188,11 @@ static int max77686_i2c_probe(struct i2c_client *i2c, > if (!max77686) > return -ENOMEM; > > - if (i2c->dev.of_node) { > - match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node); > - if (!match) > - return -EINVAL; > - > - max77686->type = (unsigned long)match->data; > - } else > - max77686->type = id->driver_data; > + match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node); > + if (!match) > + return -EINVAL; > + > + max77686->type = (unsigned long)match->data; > > i2c_set_clientdata(i2c, max77686); > max77686->dev = &i2c->dev; -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog