Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp374127pxa; Fri, 21 Aug 2020 09:24:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbQQhFMsp1fmMBlNw5/wPcKzYwUTifliFNH5A9eh/PRNXsaFCDiUD+S75oNaPYydWKWN2O X-Received: by 2002:a17:906:d18c:: with SMTP id c12mr3499088ejz.151.1598027089794; Fri, 21 Aug 2020 09:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598027089; cv=none; d=google.com; s=arc-20160816; b=jSXKItxJcMP3AKs3dh3QgVJsRwVJ/Q70UG1VVYxLihODAQlr7c7ulz/vgowpo51lTE rgNUYfx5tOBjUFneapww7RHQtXJgMb6TkEkJEZjp3j7ShC/eGMQdn+IKmq2UlxW6YWVv Lhvcl0l+oImUXJ58TXU/8yBlPTi+7oSzenoS/q70kOb93EDQ95ItLUGB2heh0SYxN53Y qKnzCi5zz18B2n7rhTYfvg8A8Pmz1hLF3Z5xDAvCE48vZsOn05Mvr8spKJ4KjaucApWE FxmUYpNaYuxtUoF4RJ1XFlovjlVyl5D+5BL8Yoc1igbURhptWnWhAOJ8RQVaUeT5splF 0/Sw== 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=sDRkrNTIbt2pcUFE6z/P4XhdVTs+f8RkNOBmzY0dBD4=; b=Qk8i/PQVfXcgz4xzIC+k+N8Alb3eaURkcfGUPA4TQEbYGDgpj9nm+kIGBgavEschxS uYdydLkSD4RdNnkQLG4RWXPGrAYcPpqtYM16/4LrtZbFKYpuCbbslfSVMRFf2PgZ8oBx t/lA24y+qaG0Mcl9Hd1DMLBjN0yR8i8rMD8dMeqxcEb3y2AiZmZdxyXD+VCpJwV2SQMQ lVyt9dvq4gSb/L7azCKoT8sKXXSRhqhqJ/lUBZuCp8A2JDAr5SIr3q/ttVNnQlxY7lbI 3SX1o0JY185EnpEcb1z5EFdoZD27MKGPYfUaWHZm9H8wPiGhL2LndVf1acFfp32XQh0w Mrow== 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 qw20si1482820ejb.371.2020.08.21.09.24.26; Fri, 21 Aug 2020 09:24:49 -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 S1728555AbgHUQXK (ORCPT + 99 others); Fri, 21 Aug 2020 12:23:10 -0400 Received: from 4.mo177.mail-out.ovh.net ([46.105.37.72]:57047 "EHLO 4.mo177.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728334AbgHUQTz (ORCPT ); Fri, 21 Aug 2020 12:19:55 -0400 X-Greylist: delayed 599 seconds by postgrey-1.27 at vger.kernel.org; Fri, 21 Aug 2020 12:19:54 EDT Received: from player696.ha.ovh.net (unknown [10.108.57.72]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id 42C3013E1EF for ; Fri, 21 Aug 2020 18:02:09 +0200 (CEST) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player696.ha.ovh.net (Postfix) with ESMTPSA id 6A9CF1576BCF9; Fri, 21 Aug 2020 16:02:03 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G00637181793-cf53-479e-a21c-e4e735c6a36c, 20EB7F6BE0168D07063FB82D5C23839419BBC220) smtp.auth=steve@sk2.org From: Stephen Kitt To: Riku Voipio , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH] hwmon: (f75375s) use simple i2c probe Date: Fri, 21 Aug 2020 18:01:59 +0200 Message-Id: <20200821160159.591293-1-steve@sk2.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17294104045806177561 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudduvddgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeetgedugfelkeeikeetgeegteevfeeufeetuefgudeiiedthfehtdeffeekvdeffeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrieeliedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehsthgvvhgvsehskhdvrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg 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/f75375s.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index eb847a7d6b83..3e567be60fb1 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -113,8 +113,7 @@ struct f75375_data { static int f75375_detect(struct i2c_client *client, struct i2c_board_info *info); -static int f75375_probe(struct i2c_client *client, - const struct i2c_device_id *id); +static int f75375_probe(struct i2c_client *client); static int f75375_remove(struct i2c_client *client); static const struct i2c_device_id f75375_id[] = { @@ -130,7 +129,7 @@ static struct i2c_driver f75375_driver = { .driver = { .name = "f75375", }, - .probe = f75375_probe, + .probe_new = f75375_probe, .remove = f75375_remove, .id_table = f75375_id, .detect = f75375_detect, @@ -814,8 +813,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, } -static int f75375_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int f75375_probe(struct i2c_client *client) { struct f75375_data *data; struct f75375s_platform_data *f75375s_pdata = @@ -832,7 +830,7 @@ static int f75375_probe(struct i2c_client *client, i2c_set_clientdata(client, data); mutex_init(&data->update_lock); - data->kind = id->driver_data; + data->kind = i2c_match_id(f75375_id, client)->driver_data; err = sysfs_create_group(&client->dev.kobj, &f75375_group); if (err) -- 2.25.4