Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp456452pxa; Fri, 21 Aug 2020 11:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY7E6Yg9ksIe9OIDGT2eJDSQePOTgllzwAyj+tFTHiM4SQRixSos98ml87nNRdl9EG0ECw X-Received: by 2002:aa7:db44:: with SMTP id n4mr4184756edt.158.1598034763005; Fri, 21 Aug 2020 11:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598034762; cv=none; d=google.com; s=arc-20160816; b=wciNw7mVh4H7qXi8s3uSifUMgzvT6n2XwJ7HOy6I5z2kg+bbhCQ1WzbMeLvkwfRE+m QRpa3DPV4JfCB+EoIRz4pcW9lwKP6UsGJUy6G6tVU3/6IRG1u7ENdoMEllsVWCZysE+L pbJPThoUsOka8IEoYQ4G/VjFwL+OFWkjRUh6P1T3uyN7W+kV9zi2sAdKi4ajTOG3HXij mY51w+WkDw30HP+VGH3FCZNfU9ZItvCCI32I87SsR5vHbLzZL6DaoSw1OtDS5zRIdfum nkHlvYwxIpnXNEoBVqBZWFL47XtjQ1oon4nM6kuDjeZ4fbLcrAItxyBKy2z8Bb+RVCu+ 7sfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zP47110S/VhRjoKqw44D0J+M/2tpqI2WT8Gl3dFgMLU=; b=Sr8a5YWZPRZZml3T0zawRgh9ByQ4i02xp3f/H79LGC+Q5WrHlxLGtSpLtJrTg3uCHB zgCWs+KeDIC7zh03qqPdm0IjcBy2+uPpXFcztXCQzKUUus53Zwi3rXusOtz0fzM90GIB 3st19ei5vL42y/PLrx14+aH4d5QPAXWBnBsfHtKXILpK8T2JFg/juPXeOEr0/PkVvjsJ tiMgneD8Bt9oP7uBzMEcIFALiY10LW3Aw+FEOgPZgPH4s/Fc6RP2Fn484FzI7jX9EAmB gsajuWagbZ5MMGj6+y4EOb0u3JKo82RwK3mWHnzNY8lW3aRnCAfMTfCg5tj6+IvKHSGX NJlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FHJhuIII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oc22si1674420ejb.267.2020.08.21.11.32.19; Fri, 21 Aug 2020 11:32:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FHJhuIII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726435AbgHUSaR (ORCPT + 99 others); Fri, 21 Aug 2020 14:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgHUSaQ (ORCPT ); Fri, 21 Aug 2020 14:30:16 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04371C06179B; Fri, 21 Aug 2020 11:30:16 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id h12so1390317pgm.7; Fri, 21 Aug 2020 11:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zP47110S/VhRjoKqw44D0J+M/2tpqI2WT8Gl3dFgMLU=; b=FHJhuIIIl2pjvt5gC0n9ebYyiLz7oPCyOoZ204GanM2l+Dt/AZK351tSCFaXcetIgB B0QuwgtbOLYh3yinGuPNmEMuTnVlomUiZvIknKW5OINsVq95f5P/8IfYpOvTztpQk7wj 5rKQx4S3UkuY6qUu7yzqikp5pMBrC0C27wlZZgHZ0vmAdgusHDxAyG5sy7EtJNqSH6Wl OQ9tZfCKlVWZju4ne50ug0G12g6VyTIGBO2fmhyEgM8OAZohfuG6Zn2pIJdtYfRPmDME ho6FzKYOww8DX4s00jUzULiSihELcvDbmTArHDtqj9RyazRKS6cbNpGU0eNKfS/zzlyr dl2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=zP47110S/VhRjoKqw44D0J+M/2tpqI2WT8Gl3dFgMLU=; b=YDEg1cIfjTG4m+gm5YVQ7pZEt2GVuNbk4TlbNx9FXbo5qDz1aVaui1WD4KHp58iBNp vXRVh9ktSHODWT9txJCt4VTECC23BjFhjTCKFa5+5t7TUEK104LamnXe3NTmYK7WKshw wp33tg58VJm6/huMU3dgAIrkePAm+oPmXL/B8b54co2QZnzCrXZTMnO9RhP5N8n0SS01 k0XwBKXaEKPqpvy4fKWto3X/LWTe322gwc6bP40m2EpDLNKL3PGHOKBiygo5aQJHDHA4 t6ft3B7Fu2rwcy7ZiqtfvmbIzE4U1F3apgVVCf85+EjRp/ZfOu09DA/X70epAswKm2gF xxyg== X-Gm-Message-State: AOAM531rZzvKfXFmXGHjsOTYo5agichd/C7YEdgMRTv9hcq82c0NbnG8 OJen07qGX3g4wqmnMbvVRVw= X-Received: by 2002:aa7:8b18:: with SMTP id f24mr3453731pfd.301.1598034615578; Fri, 21 Aug 2020 11:30:15 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c207sm3072159pfc.64.2020.08.21.11.30.14 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Aug 2020 11:30:15 -0700 (PDT) Date: Fri, 21 Aug 2020 11:30:13 -0700 From: Guenter Roeck To: Stephen Kitt Cc: Eric Tremblay , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: (tmp513) use simple i2c probe Message-ID: <20200821183013.GA61218@roeck-us.net> References: <20200821160231.592571-1-steve@sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200821160231.592571-1-steve@sk2.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 06:02:31PM +0200, Stephen Kitt wrote: > As part of the ongoing i2c transition to the simple probe > ("probe_new"), this patch uses i2c_match_id to retrieve the > driver_data for the probed device. The id parameter is thus no longer > necessary and the simple probe can be used instead. > > Signed-off-by: Stephen Kitt Applied. Thanks, Guenter > --- > drivers/hwmon/tmp513.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/hwmon/tmp513.c b/drivers/hwmon/tmp513.c > index df66e0bc1253..9f5885b0eb74 100644 > --- a/drivers/hwmon/tmp513.c > +++ b/drivers/hwmon/tmp513.c > @@ -709,8 +709,7 @@ static int tmp51x_configure(struct device *dev, struct tmp51x_data *data) > return 0; > } > > -static int tmp51x_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int tmp51x_probe(struct i2c_client *client) > { > struct device *dev = &client->dev; > struct tmp51x_data *data; > @@ -724,7 +723,7 @@ static int tmp51x_probe(struct i2c_client *client, > if (client->dev.of_node) > data->id = (enum tmp51x_ids)device_get_match_data(&client->dev); > else > - data->id = id->driver_data; > + data->id = i2c_match_id(tmp51x_id, client)->driver_data; > > ret = tmp51x_configure(dev, data); > if (ret < 0) { > @@ -751,7 +750,7 @@ static int tmp51x_probe(struct i2c_client *client, > if (IS_ERR(hwmon_dev)) > return PTR_ERR(hwmon_dev); > > - dev_dbg(dev, "power monitor %s\n", id->name); > + dev_dbg(dev, "power monitor %s\n", client->name); > > return 0; > } > @@ -761,7 +760,7 @@ static struct i2c_driver tmp51x_driver = { > .name = "tmp51x", > .of_match_table = of_match_ptr(tmp51x_of_match), > }, > - .probe = tmp51x_probe, > + .probe_new = tmp51x_probe, > .id_table = tmp51x_id, > }; >