Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp456444pxa; Fri, 21 Aug 2020 11:32:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJync+J9AXMTbA7nzbgaS101Y0wOKEQW0XcrS3rID1EW872iYTC0IwajLDJYaehBlptnXHnv X-Received: by 2002:a50:ee04:: with SMTP id g4mr4029153eds.117.1598034762040; Fri, 21 Aug 2020 11:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598034762; cv=none; d=google.com; s=arc-20160816; b=0OqZY2LxZGp8bWNRp4IE9ozhw7nfBo1XfZFV2nQOnfKaVtVmwh4gScqIDdPM1f7+Ss lzVa7R7knzpXTCCYspsgT6Srli7GZM/jFEiJBu3dsULj3wnZOYCj0m3zPGpjUc5r6hO+ SGaoU5IuYcaNB+mUZ9puhccP1VdSus70JSKcXOOokV1/3vEOtTywfzUFZUs/5nVBHFl0 3/ilXKI8b4cMrTUwX844vOn/0b4O+fLyEXlygV0JzgWlUnV5gzlDZavfO3M1AxNy6d4c 0DmFYSbBbZuWwCGJZJb/sb1gu6gzzyb79zosBP+mrv6IwZpcbqrXOn/BBwnjQ0jDQGWp RI5Q== 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=tKZ8vcbZDG4vgWba/lOpSaCf6LLl5HRskbjkaHOg2aw=; b=aB5vbaldennvAwq5DtInOhFvdToqMhrOkizvEXeZFAqN535JoJObW13m2uxcpvJytV lERZ0ETgb6d1tKeWWded6Gk7z7hk03G9Oyl44yjLtPDL7tU73naLl5kLiMq4A9IEiXMG PScayjwr3DHfZaaBDA3EXfyqX/Fzj67UbaVAafYV49i9pCnKhLlHllU9d1uJbLHiDUSQ SyC8W3BZ7/QCjdlzvpuwyBgXGUbeY9g5rBsbI+cLXuJz+rdaOpLMRxY3sablVz1Ut7Th Hqz+C99zgZFZIWLjiO7H69YV+eNxlJGTNrPZhAHuBdeP7uURIwOYwjmbRSVDKXT8jB5Y icPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CNQWA3G8; 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 j3si1689237ejd.10.2020.08.21.11.32.18; 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=CNQWA3G8; 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 S1726788AbgHUSbw (ORCPT + 99 others); Fri, 21 Aug 2020 14:31:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgHUSbt (ORCPT ); Fri, 21 Aug 2020 14:31:49 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4594FC061573; Fri, 21 Aug 2020 11:31:49 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id s14so1266789plp.4; Fri, 21 Aug 2020 11:31:49 -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=tKZ8vcbZDG4vgWba/lOpSaCf6LLl5HRskbjkaHOg2aw=; b=CNQWA3G8KHbyL27ElRqsO+M0tjlNk69l2E6h2/05zQRkzKdEdNx1Z8Eqd8I3fmX13P PHaj0ToHpXu+eJTKQdT5OD/H7Hy31oUY+58HLvQ7or3ufyYob+E9HMAKfr0hV4TnwcZv ERXzqbcwJeN1q2RMsW9YJv3prmufCgI5YTkdK/Nz6+oTJTaQfi7hmWVFI2y55edbrKJS swvjDZ5Y3YXHZR/tv4CH5z42NlPk+HkPhF2X1LVO/a5B+yKONbJ9i45IM+PDQx0hT+SB H72CjcWQujJEpZJhK2Luud5qR8rlZbNJ09p8CzMEMIawTw4Hv/u0U37Yw0p470Egn+cW GD0g== 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=tKZ8vcbZDG4vgWba/lOpSaCf6LLl5HRskbjkaHOg2aw=; b=Y1OhifOK7lftnA8cp+hz9mp25KusMAPMKfhVnY0u57KnGD50KPrNcM2Pj4Rq2r7sci XTQHYfd+oBS8+h1qUOF+xU/vWlqwaTOuyAPy2HDQ8njvaGCCvXM/9Z5VcgHif5QT8j0g b5e6R9WGufVOZXzk6Rx9jKnaOQKw0Tn/zGk1E88KBofn+8/fB/FDSaE8yCEykBM4MXEh nRo9B86nVH5GP5BROwwl2AgPkh82QmXKhAEBiO5mQ6aE/kfhLwvWFGLdApgNF8kFHFpl zFatrNaow6veVT+zlajzOtu4Uc/RBsJrFZhH23Ibr+t8pQSj46mkFCjLx/rDRRtFjxm0 3u7g== X-Gm-Message-State: AOAM532Pa5zZM9pGQ6OodSTGE26+tIySLcBWLReDqHE4TPm9xmFC2WQu Gg5dcSsT6HHSrMrA6KSRYn4= X-Received: by 2002:a17:90a:bf93:: with SMTP id d19mr3610854pjs.82.1598034708879; Fri, 21 Aug 2020 11:31:48 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id y7sm2705227pjm.3.2020.08.21.11.31.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Aug 2020 11:31:48 -0700 (PDT) Date: Fri, 21 Aug 2020 11:31:47 -0700 From: Guenter Roeck To: Stephen Kitt Cc: Juerg Haefliger , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: (dme1737) use simple i2c probe Message-ID: <20200821183147.GA104874@roeck-us.net> References: <20200821160035.590142-1-steve@sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200821160035.590142-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:00:35PM +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/dme1737.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c > index c3472b73fa79..c1e4cfb40c3d 100644 > --- a/drivers/hwmon/dme1737.c > +++ b/drivers/hwmon/dme1737.c > @@ -2461,8 +2461,9 @@ static int dme1737_i2c_detect(struct i2c_client *client, > return 0; > } > > -static int dme1737_i2c_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static const struct i2c_device_id dme1737_id[]; > + > +static int dme1737_i2c_probe(struct i2c_client *client) > { > struct dme1737_data *data; > struct device *dev = &client->dev; > @@ -2473,7 +2474,7 @@ static int dme1737_i2c_probe(struct i2c_client *client, > return -ENOMEM; > > i2c_set_clientdata(client, data); > - data->type = id->driver_data; > + data->type = i2c_match_id(dme1737_id, client)->driver_data; > data->client = client; > data->name = client->name; > mutex_init(&data->update_lock); > @@ -2529,7 +2530,7 @@ static struct i2c_driver dme1737_i2c_driver = { > .driver = { > .name = "dme1737", > }, > - .probe = dme1737_i2c_probe, > + .probe_new = dme1737_i2c_probe, > .remove = dme1737_i2c_remove, > .id_table = dme1737_id, > .detect = dme1737_i2c_detect,