Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp363022pxa; Fri, 21 Aug 2020 09:08:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5rGtdBts0Q8i31aiqAFtCfyiQ9RPSNs5ZdV8ijsOt3vI/YvPlI2/wSKTfHEYlL2pulWC2 X-Received: by 2002:a17:907:104a:: with SMTP id oy10mr3441944ejb.267.1598026125822; Fri, 21 Aug 2020 09:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598026125; cv=none; d=google.com; s=arc-20160816; b=p/lEBRD46sTzB7homDKZr9z9kypKDMw27IOB3Qun9IXwuBSb+xHMcOQ4j6Wf4qcfi1 qYO+HxpnsZ14HmvfWPsU2uq3cPFL29T5wRQv06DPqRQNrw/NIAsv0LEd28x+DCA03tu0 Kko4FMw8TuxxZcI++IcceS/NnkyeJPZW8A/hnvzHyC2XZiG2+BdClWZWWWHjKnku6ibR /n/uLeHpDOkDwh/LOsc3Uv0xUOcJcgm5J/q23fGYSMcwwJlVaYKvUkMZ3y7Hjoad3G1N 9fIHp50X2pBw76gU+2CjJcDlkLn40ye9MqDPoxFhL4NXyIdh02H5yltm6P7RdnYjPIbC 8edw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yy75SjxGmT+ptKG+xsKBulOUxntGqJA4SDmLSOUf43A=; b=wW3kDHQe+UxKNXgW+pfDMUJK86y/UnEFwXmYpaRu6wBpdUw3GrIBBKbnhRlm3KV25t 9Y2GlFRIDXzOTCrFosbT84m67x7uOCKhLXagcXOjq1aVNxjDdSosWj2ndeXyak1pkwbX s360ZcyK4lkJW+XMLXHUZQTmXp+0M6/LSqcHFGkwqMl2zk0eXYcoscz4q5YvUdT00I+U kh5dKiby8eepwczOSHtUdzK2b4Ynqed2cc8NSENiC5AgmfkjYQrfltvTfVP5WlP3d5jl nAmTCCGWp+ObZTl/QZD9rYbsV1/n7Hus/o2nL/WZIslau/PYJ9kB3HxxvwwXQJYhSjSi 27+A== ARC-Authentication-Results: i=1; mx.google.com; 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 f9si1643297edm.167.2020.08.21.09.08.21; Fri, 21 Aug 2020 09:08:45 -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; 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 S1726809AbgHUQGr (ORCPT + 99 others); Fri, 21 Aug 2020 12:06:47 -0400 Received: from 12.mo7.mail-out.ovh.net ([178.33.107.167]:50860 "EHLO 12.mo7.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgHUQGq (ORCPT ); Fri, 21 Aug 2020 12:06:46 -0400 Received: from player799.ha.ovh.net (unknown [10.108.35.158]) by mo7.mail-out.ovh.net (Postfix) with ESMTP id 7C0F4176719 for ; Fri, 21 Aug 2020 18:00:44 +0200 (CEST) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player799.ha.ovh.net (Postfix) with ESMTPSA id ABD0E156BDE9D; Fri, 21 Aug 2020 16:00:38 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-103G0059f190c4a-db29-4b17-b616-76cf4b1db7b5, 20EB7F6BE0168D07063FB82D5C23839419BBC220) smtp.auth=steve@sk2.org From: Stephen Kitt To: Juerg Haefliger , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH] hwmon: (dme1737) use simple i2c probe Date: Fri, 21 Aug 2020 18:00:35 +0200 Message-Id: <20200821160035.590142-1-steve@sk2.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17270178671746174236 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudduvddgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeetgedugfelkeeikeetgeegteevfeeufeetuefgudeiiedthfehtdeffeekvdeffeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeelledrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehsthgvvhgvsehskhdvrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, -- 2.25.4