Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4381476pxu; Wed, 9 Dec 2020 16:03:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2VhVCJYwktGgHnODzrMj4p08gkppxSkrVlQCSsK5IIMlIYOGwqEWVcipCVlPEq332R/eg X-Received: by 2002:aa7:df0f:: with SMTP id c15mr4369525edy.354.1607558616784; Wed, 09 Dec 2020 16:03:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607558616; cv=none; d=google.com; s=arc-20160816; b=rZ2G5l6gbWgWMCZMGhe/hSRPcMHpDuiWvlsycnkVRhwJUV3M17VTpz0hAF2+jZOXpm nGQr8FBM8EG4QMRAewC+zlcHfM6CQ4rB6GkQmT0GAHqCHzaWgPc8NVGEJKi3/ev3HK1Z Am5pZ6TH8YzGrQSDTujinDKnWDxFInNilulH0szdaE/r75MRmFFjnUFOaVHmt+Rwl3T+ DjoM+2/hxFMHD3u4pxkbpP8qEko6hqgfx+w1+Wgy3xNi2Wm8Nn3VH8DpzVokhJGFB/Wk +rBiVtDLpYM/8bcmNwQVSRxcVu0hW/RFSdkE8NdNW2S5/s0iMjGkRoCbqi7ag3cJ3Bba DLyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7mBAh5xnT+VP04XS76GrcNlDaZUibAG0pvS1aYckMwA=; b=MvSAFvFjCeGs1mBG+zvPRoBxbA27Q2lWXyRy6Ayrg9FYVAls0ADjSh+r8SCmglPzkD VDMf9olvT9nlBTY8xC31xYHVrIYwWvD14Wqjg+GL/0msb9lXzGhAItGR/Pn4bfV7C/wp RNxRLoyDK557vGF2Jy9zDvt4kMzBj9/xSfAO1i7H/7Q0PzOz84QSio9n/46mOA4JboRS /QNTpunA5yQqujAjp0v9q/G5yltxKpTIK4MPTCytG6SkZPh+tRd9o18n9RbZERuhXFb9 2gLtga5iPllq5t8iDP2/tUCf7+ABd7TyKZ2WSOwlc4A5w6LyRhqJ7aH7EedsaVm/rr92 ipsQ== 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 j23si1464969ejb.158.2020.12.09.16.03.13; Wed, 09 Dec 2020 16:03:36 -0800 (PST) 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 S1733056AbgLIXtz (ORCPT + 99 others); Wed, 9 Dec 2020 18:49:55 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:57163 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgLIXtr (ORCPT ); Wed, 9 Dec 2020 18:49:47 -0500 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 96AC5240006; Wed, 9 Dec 2020 23:49:04 +0000 (UTC) From: Alexandre Belloni To: Jonathan Cameron Cc: Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 1/6] iio:pressure:ms5637: switch to probe_new Date: Thu, 10 Dec 2020 00:48:52 +0100 Message-Id: <20201209234857.1521453-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> References: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to the modern i2c probe_new callback and drop the i2c_device_id array. Signed-off-by: Alexandre Belloni --- drivers/iio/pressure/ms5637.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index 5b59a4137d32..7c3f0ccd917c 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -126,8 +126,7 @@ static const struct iio_info ms5637_info = { .attrs = &ms5637_attribute_group, }; -static int ms5637_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ms5637_probe(struct i2c_client *client) { struct ms_tp_dev *dev_data; struct iio_dev *indio_dev; @@ -152,7 +151,7 @@ static int ms5637_probe(struct i2c_client *client, mutex_init(&dev_data->lock); indio_dev->info = &ms5637_info; - indio_dev->name = id->name; + indio_dev->name = device_get_match_data(&client->dev); indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = ms5637_channels; indio_dev->num_channels = ARRAY_SIZE(ms5637_channels); @@ -170,27 +169,17 @@ static int ms5637_probe(struct i2c_client *client, return devm_iio_device_register(&client->dev, indio_dev); } -static const struct i2c_device_id ms5637_id[] = { - {"ms5637", 0}, - {"ms5805", 0}, - {"ms5837", 0}, - {"ms8607-temppressure", 0}, - {} -}; -MODULE_DEVICE_TABLE(i2c, ms5637_id); - static const struct of_device_id ms5637_of_match[] = { - { .compatible = "meas,ms5637", }, - { .compatible = "meas,ms5805", }, - { .compatible = "meas,ms5837", }, - { .compatible = "meas,ms8607-temppressure", }, + { .compatible = "meas,ms5637", .data = "ms5637" }, + { .compatible = "meas,ms5805", .data = "ms5805" }, + { .compatible = "meas,ms5837", .data = "ms5837" }, + { .compatible = "meas,ms8607-temppressure", .data = "ms8607-temppressure" }, { }, }; MODULE_DEVICE_TABLE(of, ms5637_of_match); static struct i2c_driver ms5637_driver = { - .probe = ms5637_probe, - .id_table = ms5637_id, + .probe_new = ms5637_probe, .driver = { .name = "ms5637", .of_match_table = ms5637_of_match, -- 2.28.0