From patchwork Thu Dec 10 20:42:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B172C433FE for ; Thu, 10 Dec 2020 20:43:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACEC323D9A for ; Thu, 10 Dec 2020 20:43:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391051AbgLJUnC (ORCPT ); Thu, 10 Dec 2020 15:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnC (ORCPT ); Thu, 10 Dec 2020 15:43:02 -0500 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 F12A8C0613D3 for ; Thu, 10 Dec 2020 12:42:21 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id e2so5343267pgi.5 for ; Thu, 10 Dec 2020 12:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7YFQq2irQNs+8NlbpLmRJMmfQJ6r9DeA0xfnuIbAOto=; b=nqPGQnXQ21PtahYDKP0yf+irtA9Rr3aRhi/5lhGcZBhd/CsmH+iyK+wxX8CItNFu/D v5KUkdXP9hPiDYu7JXRga4KjcJHDR/E+k9+cU+w3TffnxrN8irm2chZtdVvLOz9rvKkT zlWJDBjtjhSsYnPAMEwWS9pRAy/EUBive3ZFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7YFQq2irQNs+8NlbpLmRJMmfQJ6r9DeA0xfnuIbAOto=; b=tjzeNmFnovLfzJ1tpVlvQI1hKvNz7maZ1SZVodLIIlBsZpTWgQoNvt6VhZFNASlz5v AGXGBigdEhkBy9HGqhZRCTmSPlfb2A9b1Qa3YlT5RmO4sKo2wjP5rMngZIIui+6+mNOz uuAzjTvoMvMtRMlXNFBkaSPK8piXIjMXCpSiysirr3z1OisLbJo0WvHkgUdoreNrwN8V y5SorUTjYW/4s5V8NTwNh+dDJR4Jy35k5gm0HhCvDpmx2Fv4vWFaQWzmUnNA0gc2XNMV yYMW7/zdkYWg6Fo7+0CCuEanFq13OP8s83dWiZvKVzK+zC4ALJy4GmGopce50nbQ3wno 1bGA== X-Gm-Message-State: AOAM533CGKt5ppWuFZtAPN9ZDUaZw2LUtgF/5SD/b3RdOTzn5BclipdI iFY4gMxgbbWQDcWQLeHZDNOIZt0YoNqi+A== X-Google-Smtp-Source: ABdhPJyks05EN2lY1eBKyN0gT4bs/monFbgKQ+6cFurxO8LD5Zeotb9QJaU7M0X+EGts/iwJRB2E7Q== X-Received: by 2002:a17:90a:db48:: with SMTP id u8mr9557305pjx.81.1607632941349; Thu, 10 Dec 2020 12:42:21 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id 92sm8042653pjv.15.2020.12.10.12.42.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:20 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 1/7] iio: set default trig->dev.parent Date: Thu, 10 Dec 2020 12:42:05 -0800 Message-Id: <20201210204211.967018-2-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org When allocated with [devm_]iio_trigger_alloc(), set trig device parent to the device the trigger is allocated for by default. It can always be reassigned in the probe routine. Change iio_trigger_alloc() API to add the device pointer to be coherent with devm_iio_trigger_alloc, using similar interface to iio_device_alloc(). Signed-off-by: Gwendal Grignou --- drivers/iio/accel/bma180.c | 3 +- drivers/iio/adc/ad_sigma_delta.c | 4 +-- drivers/iio/adc/at91_adc.c | 3 +- drivers/iio/adc/xilinx-xadc-core.c | 4 +-- .../common/hid-sensors/hid-sensor-trigger.c | 4 +-- .../common/st_sensors/st_sensors_trigger.c | 4 +-- drivers/iio/gyro/itg3200_buffer.c | 3 +- drivers/iio/industrialio-trigger.c | 31 ++++++++++++------- drivers/iio/trigger/iio-trig-hrtimer.c | 2 +- drivers/iio/trigger/iio-trig-interrupt.c | 2 +- drivers/iio/trigger/iio-trig-loop.c | 2 +- drivers/iio/trigger/iio-trig-sysfs.c | 3 +- include/linux/iio/trigger.h | 3 +- 13 files changed, 36 insertions(+), 32 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 6b74c2b04c15..0526021a1aed 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -1041,7 +1041,7 @@ static int bma180_probe(struct i2c_client *client, indio_dev->info = &bma180_info; if (client->irq > 0) { - data->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, + data->trig = iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, indio_dev->id); if (!data->trig) { ret = -ENOMEM; @@ -1056,7 +1056,6 @@ static int bma180_probe(struct i2c_client *client, goto err_trigger_free; } - data->trig->dev.parent = dev; data->trig->ops = &bma180_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); indio_dev->trig = iio_trigger_get(data->trig); diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index 86039e9ecaca..c0ec61592283 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -477,7 +477,8 @@ static int ad_sd_probe_trigger(struct iio_dev *indio_dev) struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev); int ret; - sigma_delta->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, + sigma_delta->trig = iio_trigger_alloc(&sigma_delta->spi->dev, + "%s-dev%d", indio_dev->name, indio_dev->id); if (sigma_delta->trig == NULL) { ret = -ENOMEM; @@ -498,7 +499,6 @@ static int ad_sd_probe_trigger(struct iio_dev *indio_dev) sigma_delta->irq_dis = true; disable_irq_nosync(sigma_delta->spi->irq); } - sigma_delta->trig->dev.parent = &sigma_delta->spi->dev; iio_trigger_set_drvdata(sigma_delta->trig, sigma_delta); ret = iio_trigger_register(sigma_delta->trig); diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 9b2c548fae95..d4f5358bf22b 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -606,12 +606,11 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *idev, struct iio_trigger *trig; int ret; - trig = iio_trigger_alloc("%s-dev%d-%s", idev->name, + trig = iio_trigger_alloc(idev->dev.parent, "%s-dev%d-%s", idev->name, idev->id, trigger->name); if (trig == NULL) return NULL; - trig->dev.parent = idev->dev.parent; iio_trigger_set_drvdata(trig, idev); trig->ops = &at91_adc_trigger_ops; diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c index f93c34fe5873..8d2f7dfbc069 100644 --- a/drivers/iio/adc/xilinx-xadc-core.c +++ b/drivers/iio/adc/xilinx-xadc-core.c @@ -708,12 +708,12 @@ static struct iio_trigger *xadc_alloc_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig; int ret; - trig = iio_trigger_alloc("%s%d-%s", indio_dev->name, + trig = iio_trigger_alloc(indio_dev->dev.parent, + "%s%d-%s", indio_dev->name, indio_dev->id, name); if (trig == NULL) return ERR_PTR(-ENOMEM); - trig->dev.parent = indio_dev->dev.parent; trig->ops = &xadc_trigger_ops; iio_trigger_set_drvdata(trig, iio_priv(indio_dev)); diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index ff375790b7e8..7988e59b2f70 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c @@ -257,14 +257,14 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, return ret; } - trig = iio_trigger_alloc("%s-dev%d", name, indio_dev->id); + trig = iio_trigger_alloc(indio_dev->dev.parent, + "%s-dev%d", name, indio_dev->id); if (trig == NULL) { dev_err(&indio_dev->dev, "Trigger Allocate Failed\n"); ret = -ENOMEM; goto error_triggered_buffer_cleanup; } - trig->dev.parent = indio_dev->dev.parent; iio_trigger_set_drvdata(trig, attrb); trig->ops = &hid_sensor_trigger_ops; ret = iio_trigger_register(trig); diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index 0507283bd4c1..23d8ec7160fc 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -127,7 +127,8 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, unsigned long irq_trig; int err; - sdata->trig = iio_trigger_alloc("%s-trigger", indio_dev->name); + sdata->trig = iio_trigger_alloc(sdata->dev, "%s-trigger", + indio_dev->name); if (sdata->trig == NULL) { dev_err(&indio_dev->dev, "failed to allocate iio trigger.\n"); return -ENOMEM; @@ -135,7 +136,6 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, iio_trigger_set_drvdata(sdata->trig, indio_dev); sdata->trig->ops = trigger_ops; - sdata->trig->dev.parent = sdata->dev; irq_trig = irqd_get_trigger_type(irq_get_irq_data(sdata->irq)); /* diff --git a/drivers/iio/gyro/itg3200_buffer.c b/drivers/iio/gyro/itg3200_buffer.c index 1c3c1bd53374..af0aaa146f0c 100644 --- a/drivers/iio/gyro/itg3200_buffer.c +++ b/drivers/iio/gyro/itg3200_buffer.c @@ -113,7 +113,7 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev) int ret; struct itg3200 *st = iio_priv(indio_dev); - st->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, + st->trig = iio_trigger_alloc(&st->i2c->dev, "%s-dev%d", indio_dev->name, indio_dev->id); if (!st->trig) return -ENOMEM; @@ -127,7 +127,6 @@ int itg3200_probe_trigger(struct iio_dev *indio_dev) goto error_free_trig; - st->trig->dev.parent = &st->i2c->dev; st->trig->ops = &itg3200_trigger_ops; iio_trigger_set_drvdata(st->trig, indio_dev); ret = iio_trigger_register(st->trig); diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index 583bb51f65a7..83006d1f7eea 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -516,8 +516,10 @@ static void iio_trig_subirqunmask(struct irq_data *d) trig->subirqs[d->irq - trig->subirq_base].enabled = true; } -static __printf(1, 0) -struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs) +static __printf(2, 0) +struct iio_trigger *viio_trigger_alloc(struct device *dev, + const char *fmt, + va_list vargs) { struct iio_trigger *trig; int i; @@ -526,6 +528,7 @@ struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs) if (!trig) return NULL; + trig->dev.parent = dev; trig->dev.type = &iio_trig_type; trig->dev.bus = &iio_bus_type; device_initialize(&trig->dev); @@ -561,13 +564,23 @@ struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs) return NULL; } -struct iio_trigger *iio_trigger_alloc(const char *fmt, ...) +/** + * iio_trigger_alloc - Allocate a trigger + * @dev: Device to allocate iio_trigger for + * @fmt: trigger name format. If it includes format + * specifiers, the additional arguments following + * format are formatted and inserted in the resulting + * string replacing their respective specifiers. + * RETURNS: + * Pointer to allocated iio_trigger on success, NULL on failure. + */ +struct iio_trigger *iio_trigger_alloc(struct device *dev, const char *fmt, ...) { struct iio_trigger *trig; va_list vargs; va_start(vargs, fmt); - trig = viio_trigger_alloc(fmt, vargs); + trig = viio_trigger_alloc(dev, fmt, vargs); va_end(vargs); return trig; @@ -588,12 +601,6 @@ static void devm_iio_trigger_release(struct device *dev, void *res) /** * devm_iio_trigger_alloc - Resource-managed iio_trigger_alloc() - * @dev: Device to allocate iio_trigger for - * @fmt: trigger name format. If it includes format - * specifiers, the additional arguments following - * format are formatted and inserted in the resulting - * string replacing their respective specifiers. - * * Managed iio_trigger_alloc. iio_trigger allocated with this function is * automatically freed on driver detach. * @@ -601,7 +608,7 @@ static void devm_iio_trigger_release(struct device *dev, void *res) * Pointer to allocated iio_trigger on success, NULL on failure. */ struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, - const char *fmt, ...) + const char *fmt, ...) { struct iio_trigger **ptr, *trig; va_list vargs; @@ -613,7 +620,7 @@ struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, /* use raw alloc_dr for kmalloc caller tracing */ va_start(vargs, fmt); - trig = viio_trigger_alloc(fmt, vargs); + trig = viio_trigger_alloc(dev, fmt, vargs); va_end(vargs); if (trig) { *ptr = trig; diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c index f59bf8d58586..3591bbbedf0c 100644 --- a/drivers/iio/trigger/iio-trig-hrtimer.c +++ b/drivers/iio/trigger/iio-trig-hrtimer.c @@ -122,7 +122,7 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name) if (!trig_info) return ERR_PTR(-ENOMEM); - trig_info->swt.trigger = iio_trigger_alloc("%s", name); + trig_info->swt.trigger = iio_trigger_alloc(NULL, "%s", name); if (!trig_info->swt.trigger) { ret = -ENOMEM; goto err_free_trig_info; diff --git a/drivers/iio/trigger/iio-trig-interrupt.c b/drivers/iio/trigger/iio-trig-interrupt.c index 94a487caf421..f746c460bf2a 100644 --- a/drivers/iio/trigger/iio-trig-interrupt.c +++ b/drivers/iio/trigger/iio-trig-interrupt.c @@ -45,7 +45,7 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev) irq = irq_res->start; - trig = iio_trigger_alloc("irqtrig%d", irq); + trig = iio_trigger_alloc(NULL, "irqtrig%d", irq); if (!trig) { ret = -ENOMEM; goto error_ret; diff --git a/drivers/iio/trigger/iio-trig-loop.c b/drivers/iio/trigger/iio-trig-loop.c index 4a00668e3258..96ec06bbe546 100644 --- a/drivers/iio/trigger/iio-trig-loop.c +++ b/drivers/iio/trigger/iio-trig-loop.c @@ -84,7 +84,7 @@ static struct iio_sw_trigger *iio_trig_loop_probe(const char *name) if (!trig_info) return ERR_PTR(-ENOMEM); - trig_info->swt.trigger = iio_trigger_alloc("%s", name); + trig_info->swt.trigger = iio_trigger_alloc(NULL, "%s", name); if (!trig_info->swt.trigger) { ret = -ENOMEM; goto err_free_trig_info; diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c index e09e58072872..b861ee1bc79a 100644 --- a/drivers/iio/trigger/iio-trig-sysfs.c +++ b/drivers/iio/trigger/iio-trig-sysfs.c @@ -149,7 +149,7 @@ static int iio_sysfs_trigger_probe(int id) goto out1; } t->id = id; - t->trig = iio_trigger_alloc("sysfstrig%d", id); + t->trig = iio_trigger_alloc(&iio_sysfs_trig_dev, "sysfstrig%d", id); if (!t->trig) { ret = -ENOMEM; goto free_t; @@ -157,7 +157,6 @@ static int iio_sysfs_trigger_probe(int id) t->trig->dev.groups = iio_sysfs_trigger_attr_groups; t->trig->ops = &iio_sysfs_trigger_ops; - t->trig->dev.parent = &iio_sysfs_trig_dev; iio_trigger_set_drvdata(t->trig, t); init_irq_work(&t->work, iio_sysfs_trigger_work); diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index cad8325903f9..089e1961810c 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h @@ -161,7 +161,8 @@ void iio_trigger_poll_chained(struct iio_trigger *trig); irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private); -__printf(1, 2) struct iio_trigger *iio_trigger_alloc(const char *fmt, ...); +__printf(2, 3) struct iio_trigger *iio_trigger_alloc(struct device *dev, + const char *fmt, ...); void iio_trigger_free(struct iio_trigger *trig); /** From patchwork Thu Dec 10 20:42:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED0DFC433FE for ; Thu, 10 Dec 2020 20:43:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3CF023D9A for ; Thu, 10 Dec 2020 20:43:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392420AbgLJUnF (ORCPT ); Thu, 10 Dec 2020 15:43:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnF (ORCPT ); Thu, 10 Dec 2020 15:43:05 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0D5FC0613D6 for ; Thu, 10 Dec 2020 12:42:24 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id f9so5234282pfc.11 for ; Thu, 10 Dec 2020 12:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OC6QSm7+4W/GxFtfVZnRXmO+23W3Kn8aZ2OPLvK/OhU=; b=Fe7oFkJ2T0tLSA+eQiQV4kMfzoJg5rMebqLhoZKt1Vdxiz/0fyGqV20ML1CJE9m273 IDsbdHdtPuw5n16cpx1TE72spPHBPdQ44nCXH0A31qEEUWy6uxDTB6En+xC//2r4UFMj kv2E9+N224/ulNWHyGIa+2CPWcXMhX6aBvFFI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OC6QSm7+4W/GxFtfVZnRXmO+23W3Kn8aZ2OPLvK/OhU=; b=aIPKirKds6lnzRlln7ymvpLsJg2dux9v7POdK6UGa0r4FdO4lNL5vfUql0elQhqUS8 GL/uPBpos34zy11yQ32MlsluADXvLW0nJusVjObSmaRqfNQyUiEhFa2RfFFIAARlk9OE Q4LScXVQ5e+B9RbGScwzwiP++p44LAVXmy7+zQUp+Joe+qFflao75dC4583CAw4Vi1Fi Y5coLpM5m5HZrtL6x3n2oPJ5TN8uDSR3GLtxCU0RgACWyepKq2+pN0+9LwjEq5HNpWHC IWy4D8njT4pjlmREjV2BRck4nzBH9T83kN3PbvaqXy1FcRCoxhDU+b980MP/ED0MUGU1 v9Fw== X-Gm-Message-State: AOAM531MPplghw5K4DSkSZXbp41NYZooBjAwAMayf+Ixj4giy/hj8N2M vLvjhO/3mccODaFit1m1x/l84A== X-Google-Smtp-Source: ABdhPJz6rPwFX9DSey2lOpF3Ohuj+7MArg6N+y8WIvJAAAjuK8DAV4zoeqkhwFDUH4D4NegzbZdqDg== X-Received: by 2002:a17:90b:3011:: with SMTP id hg17mr9592172pjb.22.1607632944429; Thu, 10 Dec 2020 12:42:24 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id f29sm7673431pfk.32.2020.12.10.12.42.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:23 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 2/7] iio: fix devm_iio_trigger_alloc with parent.cocci Date: Thu, 10 Dec 2020 12:42:06 -0800 Message-Id: <20201210204211.967018-3-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Use cocci semantic patch: @@ expression trigger, P, name; @@ trigger = devm_iio_trigger_alloc(P, ...); ... - trigger->dev.parent = P; To remove trigger->dev.parent, since it is set by default. Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/accel/adxl372.c | 2 -- drivers/iio/accel/bmc150-accel-core.c | 1 - drivers/iio/accel/kxcjk-1013.c | 2 -- drivers/iio/accel/mma8452.c | 1 - drivers/iio/accel/mxc4005.c | 1 - drivers/iio/accel/stk8312.c | 1 - drivers/iio/accel/stk8ba50.c | 1 - drivers/iio/adc/ad7606.c | 1 - drivers/iio/adc/ad7766.c | 1 - drivers/iio/adc/ad7768-1.c | 1 - drivers/iio/adc/max1027.c | 1 - drivers/iio/chemical/ccs811.c | 1 - drivers/iio/chemical/scd30_core.c | 1 - drivers/iio/gyro/adxrs290.c | 1 - drivers/iio/gyro/bmg160_core.c | 2 -- drivers/iio/gyro/fxas21002c_core.c | 1 - drivers/iio/health/afe4403.c | 1 - drivers/iio/health/afe4404.c | 1 - drivers/iio/humidity/hts221_buffer.c | 1 - drivers/iio/imu/kmx61.c | 1 - drivers/iio/light/rpr0521.c | 1 - drivers/iio/light/si1145.c | 1 - drivers/iio/light/st_uvis25_core.c | 1 - drivers/iio/light/vcnl4000.c | 1 - drivers/iio/light/vcnl4035.c | 1 - drivers/iio/magnetometer/bmc150_magn.c | 1 - drivers/iio/magnetometer/rm3100-core.c | 1 - drivers/iio/pressure/zpa2326.c | 1 - drivers/iio/proximity/sx9310.c | 1 - drivers/iio/proximity/sx932x.c | 1 - drivers/iio/proximity/sx9500.c | 1 - 31 files changed, 34 deletions(-) diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c index aed2a4930fb0..f21b1f414271 100644 --- a/drivers/iio/accel/adxl372.c +++ b/drivers/iio/accel/adxl372.c @@ -1237,8 +1237,6 @@ int adxl372_probe(struct device *dev, struct regmap *regmap, st->dready_trig->ops = &adxl372_trigger_ops; st->peak_datardy_trig->ops = &adxl372_peak_data_trigger_ops; - st->dready_trig->dev.parent = dev; - st->peak_datardy_trig->dev.parent = dev; iio_trigger_set_drvdata(st->dready_trig, indio_dev); iio_trigger_set_drvdata(st->peak_datardy_trig, indio_dev); ret = devm_iio_trigger_register(dev, st->dready_trig); diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index 48435865fdaf..5c97232051df 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -1362,7 +1362,6 @@ static int bmc150_accel_triggers_setup(struct iio_dev *indio_dev, break; } - t->indio_trig->dev.parent = dev; t->indio_trig->ops = &bmc150_accel_trigger_ops; t->intr = bmc150_accel_triggers[i].intr; t->data = data; diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 560a3373ff20..bb21488febe0 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1385,7 +1385,6 @@ static int kxcjk1013_probe(struct i2c_client *client, goto err_poweroff; } - data->dready_trig->dev.parent = &client->dev; data->dready_trig->ops = &kxcjk1013_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); indio_dev->trig = data->dready_trig; @@ -1394,7 +1393,6 @@ static int kxcjk1013_probe(struct i2c_client *client, if (ret) goto err_poweroff; - data->motion_trig->dev.parent = &client->dev; data->motion_trig->ops = &kxcjk1013_trigger_ops; iio_trigger_set_drvdata(data->motion_trig, indio_dev); ret = iio_trigger_register(data->motion_trig); diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index bf1d2c8afdbd..2cced843c9e2 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -1465,7 +1465,6 @@ static int mma8452_trigger_setup(struct iio_dev *indio_dev) if (!trig) return -ENOMEM; - trig->dev.parent = &data->client->dev; trig->ops = &mma8452_trigger_ops; iio_trigger_set_drvdata(trig, indio_dev); diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c index f877263dc6ef..0f037403181f 100644 --- a/drivers/iio/accel/mxc4005.c +++ b/drivers/iio/accel/mxc4005.c @@ -454,7 +454,6 @@ static int mxc4005_probe(struct i2c_client *client, return ret; } - data->dready_trig->dev.parent = &client->dev; data->dready_trig->ops = &mxc4005_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); indio_dev->trig = data->dready_trig; diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c index 3b59887a8581..7c3b70eb3f2d 100644 --- a/drivers/iio/accel/stk8312.c +++ b/drivers/iio/accel/stk8312.c @@ -558,7 +558,6 @@ static int stk8312_probe(struct i2c_client *client, goto err_power_off; } - data->dready_trig->dev.parent = &client->dev; data->dready_trig->ops = &stk8312_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); ret = iio_trigger_register(data->dready_trig); diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c index 3ead378b02c9..bf0368ce46e1 100644 --- a/drivers/iio/accel/stk8ba50.c +++ b/drivers/iio/accel/stk8ba50.c @@ -454,7 +454,6 @@ static int stk8ba50_probe(struct i2c_client *client, goto err_power_off; } - data->dready_trig->dev.parent = &client->dev; data->dready_trig->ops = &stk8ba50_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); ret = iio_trigger_register(data->dready_trig); diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index ee7b108688b3..0af0bb4d5a7f 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -668,7 +668,6 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address, return -ENOMEM; st->trig->ops = &ad7606_trigger_ops; - st->trig->dev.parent = dev; iio_trigger_set_drvdata(st->trig, indio_dev); ret = devm_iio_trigger_register(dev, st->trig); if (ret) diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c index b6b6765be7b4..829a3426f235 100644 --- a/drivers/iio/adc/ad7766.c +++ b/drivers/iio/adc/ad7766.c @@ -253,7 +253,6 @@ static int ad7766_probe(struct spi_device *spi) return -ENOMEM; ad7766->trig->ops = &ad7766_trigger_ops; - ad7766->trig->dev.parent = &spi->dev; iio_trigger_set_drvdata(ad7766->trig, ad7766); ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index 0e93b0766eb4..241c1e0f0cec 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -594,7 +594,6 @@ static int ad7768_probe(struct spi_device *spi) return -ENOMEM; st->trig->ops = &ad7768_trigger_ops; - st->trig->dev.parent = &spi->dev; iio_trigger_set_drvdata(st->trig, indio_dev); ret = devm_iio_trigger_register(&spi->dev, st->trig); if (ret) diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c index ca1dff3924ff..e3c8ec107722 100644 --- a/drivers/iio/adc/max1027.c +++ b/drivers/iio/adc/max1027.c @@ -473,7 +473,6 @@ static int max1027_probe(struct spi_device *spi) } st->trig->ops = &max1027_trigger_ops; - st->trig->dev.parent = &spi->dev; iio_trigger_set_drvdata(st->trig, indio_dev); ret = devm_iio_trigger_register(&indio_dev->dev, st->trig); diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c index 60dd87e96f5f..886e96496dbf 100644 --- a/drivers/iio/chemical/ccs811.c +++ b/drivers/iio/chemical/ccs811.c @@ -497,7 +497,6 @@ static int ccs811_probe(struct i2c_client *client, goto err_poweroff; } - data->drdy_trig->dev.parent = &client->dev; data->drdy_trig->ops = &ccs811_trigger_ops; iio_trigger_set_drvdata(data->drdy_trig, indio_dev); indio_dev->trig = data->drdy_trig; diff --git a/drivers/iio/chemical/scd30_core.c b/drivers/iio/chemical/scd30_core.c index 4d0d798c7cd3..261c277ac4a5 100644 --- a/drivers/iio/chemical/scd30_core.c +++ b/drivers/iio/chemical/scd30_core.c @@ -646,7 +646,6 @@ static int scd30_setup_trigger(struct iio_dev *indio_dev) return -ENOMEM; } - trig->dev.parent = dev; trig->ops = &scd30_trigger_ops; iio_trigger_set_drvdata(trig, indio_dev); diff --git a/drivers/iio/gyro/adxrs290.c b/drivers/iio/gyro/adxrs290.c index ca6fc234076e..15223fc09a46 100644 --- a/drivers/iio/gyro/adxrs290.c +++ b/drivers/iio/gyro/adxrs290.c @@ -595,7 +595,6 @@ static int adxrs290_probe_trigger(struct iio_dev *indio_dev) if (!st->dready_trig) return -ENOMEM; - st->dready_trig->dev.parent = &st->spi->dev; st->dready_trig->ops = &adxrs290_trigger_ops; iio_trigger_set_drvdata(st->dready_trig, indio_dev); diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 8ddda96455fc..c964355e355b 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -1127,14 +1127,12 @@ int bmg160_core_probe(struct device *dev, struct regmap *regmap, int irq, if (!data->motion_trig) return -ENOMEM; - data->dready_trig->dev.parent = dev; data->dready_trig->ops = &bmg160_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); ret = iio_trigger_register(data->dready_trig); if (ret) return ret; - data->motion_trig->dev.parent = dev; data->motion_trig->ops = &bmg160_trigger_ops; iio_trigger_set_drvdata(data->motion_trig, indio_dev); ret = iio_trigger_register(data->motion_trig); diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c index 129eead8febc..1a20c6b88e7d 100644 --- a/drivers/iio/gyro/fxas21002c_core.c +++ b/drivers/iio/gyro/fxas21002c_core.c @@ -875,7 +875,6 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data) if (ret < 0) return ret; - data->dready_trig->dev.parent = dev; data->dready_trig->ops = &fxas21002c_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c index 38734e4ce360..1fa8d51d5080 100644 --- a/drivers/iio/health/afe4403.c +++ b/drivers/iio/health/afe4403.c @@ -531,7 +531,6 @@ static int afe4403_probe(struct spi_device *spi) iio_trigger_set_drvdata(afe->trig, indio_dev); afe->trig->ops = &afe4403_trigger_ops; - afe->trig->dev.parent = afe->dev; ret = iio_trigger_register(afe->trig); if (ret) { diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c index 61fe4932d81d..e1476bf79fe2 100644 --- a/drivers/iio/health/afe4404.c +++ b/drivers/iio/health/afe4404.c @@ -538,7 +538,6 @@ static int afe4404_probe(struct i2c_client *client, iio_trigger_set_drvdata(afe->trig, indio_dev); afe->trig->ops = &afe4404_trigger_ops; - afe->trig->dev.parent = afe->dev; ret = iio_trigger_register(afe->trig); if (ret) { diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c index 95e56917677f..f29692b9d2db 100644 --- a/drivers/iio/humidity/hts221_buffer.c +++ b/drivers/iio/humidity/hts221_buffer.c @@ -135,7 +135,6 @@ int hts221_allocate_trigger(struct iio_dev *iio_dev) iio_trigger_set_drvdata(hw->trig, iio_dev); hw->trig->ops = &hts221_trigger_ops; - hw->trig->dev.parent = hw->dev; iio_dev->trig = iio_trigger_get(hw->trig); return devm_iio_trigger_register(hw->dev, hw->trig); diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index 61885e99d3fc..b804a58fe8fb 100644 --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu/kmx61.c @@ -1272,7 +1272,6 @@ static struct iio_trigger *kmx61_trigger_setup(struct kmx61_data *data, if (!trig) return ERR_PTR(-ENOMEM); - trig->dev.parent = &data->client->dev; trig->ops = &kmx61_trigger_ops; iio_trigger_set_drvdata(trig, indio_dev); diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c index aa2972b04833..7fe14214bb69 100644 --- a/drivers/iio/light/rpr0521.c +++ b/drivers/iio/light/rpr0521.c @@ -981,7 +981,6 @@ static int rpr0521_probe(struct i2c_client *client, ret = -ENOMEM; goto err_pm_disable; } - data->drdy_trigger0->dev.parent = indio_dev->dev.parent; data->drdy_trigger0->ops = &rpr0521_trigger_ops; indio_dev->available_scan_masks = rpr0521_available_scan_masks; iio_trigger_set_drvdata(data->drdy_trigger0, indio_dev); diff --git a/drivers/iio/light/si1145.c b/drivers/iio/light/si1145.c index b304801c7916..9b5c99823943 100644 --- a/drivers/iio/light/si1145.c +++ b/drivers/iio/light/si1145.c @@ -1247,7 +1247,6 @@ static int si1145_probe_trigger(struct iio_dev *indio_dev) if (!trig) return -ENOMEM; - trig->dev.parent = &client->dev; trig->ops = &si1145_trigger_ops; iio_trigger_set_drvdata(trig, indio_dev); diff --git a/drivers/iio/light/st_uvis25_core.c b/drivers/iio/light/st_uvis25_core.c index a18a82e6bbf5..10fc5aa8675b 100644 --- a/drivers/iio/light/st_uvis25_core.c +++ b/drivers/iio/light/st_uvis25_core.c @@ -210,7 +210,6 @@ static int st_uvis25_allocate_trigger(struct iio_dev *iio_dev) return -ENOMEM; iio_trigger_set_drvdata(hw->trig, iio_dev); - hw->trig->dev.parent = dev; return devm_iio_trigger_register(dev, hw->trig); } diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index fff4b36b8b58..2f7916f95689 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -1002,7 +1002,6 @@ static int vcnl4010_probe_trigger(struct iio_dev *indio_dev) if (!trigger) return -ENOMEM; - trigger->dev.parent = &client->dev; trigger->ops = &vcnl4010_trigger_ops; iio_trigger_set_drvdata(trigger, indio_dev); diff --git a/drivers/iio/light/vcnl4035.c b/drivers/iio/light/vcnl4035.c index 765c44adac57..e732d308ac4e 100644 --- a/drivers/iio/light/vcnl4035.c +++ b/drivers/iio/light/vcnl4035.c @@ -511,7 +511,6 @@ static int vcnl4035_probe_trigger(struct iio_dev *indio_dev) if (!data->drdy_trigger0) return -ENOMEM; - data->drdy_trigger0->dev.parent = indio_dev->dev.parent; data->drdy_trigger0->ops = &vcnl4035_trigger_ops; iio_trigger_set_drvdata(data->drdy_trigger0, indio_dev); ret = devm_iio_trigger_register(indio_dev->dev.parent, diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c index fc6840f9c1fa..ebe13a5043d4 100644 --- a/drivers/iio/magnetometer/bmc150_magn.c +++ b/drivers/iio/magnetometer/bmc150_magn.c @@ -899,7 +899,6 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap, goto err_poweroff; } - data->dready_trig->dev.parent = dev; data->dready_trig->ops = &bmc150_magn_trigger_ops; iio_trigger_set_drvdata(data->dready_trig, indio_dev); ret = iio_trigger_register(data->dready_trig); diff --git a/drivers/iio/magnetometer/rm3100-core.c b/drivers/iio/magnetometer/rm3100-core.c index 7242897a05e9..dd811da9cb6d 100644 --- a/drivers/iio/magnetometer/rm3100-core.c +++ b/drivers/iio/magnetometer/rm3100-core.c @@ -579,7 +579,6 @@ int rm3100_common_probe(struct device *dev, struct regmap *regmap, int irq) if (!data->drdy_trig) return -ENOMEM; - data->drdy_trig->dev.parent = dev; ret = devm_iio_trigger_register(dev, data->drdy_trig); if (ret < 0) return ret; diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c index 2cecbe0adb3f..70adff62cd20 100644 --- a/drivers/iio/pressure/zpa2326.c +++ b/drivers/iio/pressure/zpa2326.c @@ -1413,7 +1413,6 @@ static int zpa2326_init_managed_trigger(struct device *parent, return -ENOMEM; /* Basic setup. */ - trigger->dev.parent = parent; trigger->ops = &zpa2326_trigger_ops; private->trigger = trigger; diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c index ee1b4ff05a37..46947776da09 100644 --- a/drivers/iio/proximity/sx9310.c +++ b/drivers/iio/proximity/sx9310.c @@ -1452,7 +1452,6 @@ static int sx9310_probe(struct i2c_client *client) if (!data->trig) return -ENOMEM; - data->trig->dev.parent = dev; data->trig->ops = &sx9310_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); diff --git a/drivers/iio/proximity/sx932x.c b/drivers/iio/proximity/sx932x.c index 26503348ce85..95ad49e627c6 100644 --- a/drivers/iio/proximity/sx932x.c +++ b/drivers/iio/proximity/sx932x.c @@ -1336,7 +1336,6 @@ static int sx932x_probe(struct i2c_client *client, if (!data->trig) return -ENOMEM; - data->trig->dev.parent = &client->dev; data->trig->ops = &sx932x_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index acb821cbad46..bb42aa5d596e 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -950,7 +950,6 @@ static int sx9500_probe(struct i2c_client *client, if (!data->trig) return -ENOMEM; - data->trig->dev.parent = &client->dev; data->trig->ops = &sx9500_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); From patchwork Thu Dec 10 20:42:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CE18C4361B for ; Thu, 10 Dec 2020 20:43:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DFE3523D9A for ; Thu, 10 Dec 2020 20:43:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392739AbgLJUnH (ORCPT ); Thu, 10 Dec 2020 15:43:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnH (ORCPT ); Thu, 10 Dec 2020 15:43:07 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F155C061793 for ; Thu, 10 Dec 2020 12:42:27 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id i3so5249350pfd.6 for ; Thu, 10 Dec 2020 12:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+cSdocwrQCE8SPCC6qgrwoAsqVYKoyLdt8uvvT/yqjY=; b=MxI+e6w2OANe1UkPtu35JC3A9vcQMC7Qr+R/yHSIskVqDZr4v+oOp+u4nGt5HyBYCl 122fSrH1KCI+RucpLJQ0Ii/nM/yLC1gyG9ZvWgQimKkPIGquRoZsG/5llbO+uBac8jWd t2dzqbExA2+STu7oIkfRLTEDfBVhGAt/ghjVw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+cSdocwrQCE8SPCC6qgrwoAsqVYKoyLdt8uvvT/yqjY=; b=HC0ZFPtADHLkYK0uLLD+3srhv9zbat8c/jdCz/uNZ9H/QTCzORzCAYZwakJ1EW5n4G IIKTgP1I/ZCO8V+VHGfbI7IaMkljuQAaNsv/GQdElHY8sl+BpCzcqGJOYZHjiXxj1B/d nXpSJCG99rRied/0jTbONCw4NWz4fIC/bGQpK8O7L2+PuUAnlJtpt3Dok6X1ly2ifSLc R4RClvKAkkSiguC8J4RWAz9BCDd8F9+QEgQ1l5ZO63kfY+tjbNoJ6HeRKfCDKwIwdQ0p kLOmMV8rzSo1kThC1Wb49451dVG2UegdSDmYONpDPMJF74wLSnxvPbiwFACxZex6GXDC p8sQ== X-Gm-Message-State: AOAM530i6d7Z9emEmJtSMlGD8jkdF/VRyj3Nn709bJaCHo1+tDLFMdTa k0vJgZtP+GH+ccE0V7yVKQClWQ== X-Google-Smtp-Source: ABdhPJzVEaf0H+VgRHiHc2ys2CX4MomX8oQNoWlOVM32yOmhtgArgJlD83V2Ip+4LmTl1gvuaEcUVQ== X-Received: by 2002:a63:4566:: with SMTP id u38mr8343513pgk.423.1607632946779; Thu, 10 Dec 2020 12:42:26 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id z7sm7461492pfq.193.2020.12.10.12.42.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:25 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 3/7] iio: adis_trigger: Remove code to set trigger parent Date: Thu, 10 Dec 2020 12:42:07 -0800 Message-Id: <20201210204211.967018-4-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Already done in boiler plate code. Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/imu/adis_trigger.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c index 64e0ba51cb18..0f29e56200af 100644 --- a/drivers/iio/imu/adis_trigger.c +++ b/drivers/iio/imu/adis_trigger.c @@ -27,13 +27,6 @@ static const struct iio_trigger_ops adis_trigger_ops = { .set_trigger_state = &adis_data_rdy_trigger_set_state, }; -static void adis_trigger_setup(struct adis *adis) -{ - adis->trig->dev.parent = &adis->spi->dev; - adis->trig->ops = &adis_trigger_ops; - iio_trigger_set_drvdata(adis->trig, adis); -} - static int adis_validate_irq_flag(struct adis *adis) { /* @@ -72,7 +65,8 @@ int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev) if (!adis->trig) return -ENOMEM; - adis_trigger_setup(adis); + adis->trig->ops = &adis_trigger_ops; + iio_trigger_set_drvdata(adis->trig, adis); ret = adis_validate_irq_flag(adis); if (ret) From patchwork Thu Dec 10 20:42:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966489 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C668DC4167B for ; Thu, 10 Dec 2020 20:43:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84D3423D9A for ; Thu, 10 Dec 2020 20:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393257AbgLJUnJ (ORCPT ); Thu, 10 Dec 2020 15:43:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnJ (ORCPT ); Thu, 10 Dec 2020 15:43:09 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC607C061794 for ; Thu, 10 Dec 2020 12:42:28 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id c12so4856856pgm.4 for ; Thu, 10 Dec 2020 12:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vc0hna1MMQXcI9WHF5sYV5Q5q5p+6qbvyeixpWRhxpg=; b=bGycRMOLqTdh0xLH7G+D4rsqRWzBs12WPAdwx1hSI2heG0ERRdwJZkLL0Wlz9u2O3F l8aeyCU8+G64e6tW54FphsKC/b7auHSEBtS2yOx2M2pE6R24mxTznywS8+AX9DNhCC6b WmFCElEe7u+L9gCujRaYMt8BQbLgbzezNsjPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vc0hna1MMQXcI9WHF5sYV5Q5q5p+6qbvyeixpWRhxpg=; b=bZuZV7wR8en3dxV58q4l7taBGzozIIoz6qs/NUCSR7tcjvwxUpub7Ps1WNriS01IHq wcC5W9pphPnDSFuqwFzML7wgtslbabRskQL2+IPDitPyatO1HTrYnOr0G1mYdNtVTiW7 iZmYX1WICwKDVdZT1cAktUgSl2liIgw5BK9avs+lpULcGqG6R3jfYdT0u+VsG4wgNPaw H5e9pkgtHUJ+vPwgS2PXg0o7VgwAaPNGXR2q9SFjfbDINFOQiNAP7teJ9dfu+wyK4ece eQfkOsjcVUl/iktVYFulPcmvMEDeJDx4JEMS4R0Q+hOO9at4IL9JDyZ4QotDQ2UXu19z Jj/A== X-Gm-Message-State: AOAM530tnNQDGS1BiEJYrQgc90vIfVOLe+r3deBX2JK4XCUWf+nxq2Va HiL4i9JU9sdhPH+Nj6q2dq/AJg== X-Google-Smtp-Source: ABdhPJwclV0n72FmARFTysM+4EE7k4J7+Lmpzg/p5wC7NDUIpTQoggGD3h/7ByUBsJsa6Sf+/Z3dug== X-Received: by 2002:a62:dd94:0:b029:19e:92ec:722a with SMTP id w142-20020a62dd940000b029019e92ec722amr8257426pff.50.1607632948437; Thu, 10 Dec 2020 12:42:28 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id h16sm7254927pgd.62.2020.12.10.12.42.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:27 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 4/7] iio: gp2ap020a00f: Remove code to set trigger parent Date: Thu, 10 Dec 2020 12:42:08 -0800 Message-Id: <20201210204211.967018-5-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Already done in boiler plate code Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/light/gp2ap020a00f.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c index e2850c1a7353..d1d9f2d319e4 100644 --- a/drivers/iio/light/gp2ap020a00f.c +++ b/drivers/iio/light/gp2ap020a00f.c @@ -1551,7 +1551,6 @@ static int gp2ap020a00f_probe(struct i2c_client *client, } data->trig->ops = &gp2ap020a00f_trigger_ops; - data->trig->dev.parent = &data->client->dev; init_irq_work(&data->work, gp2ap020a00f_iio_trigger_work); From patchwork Thu Dec 10 20:42:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EC4FC4361B for ; Thu, 10 Dec 2020 20:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF98123D9A for ; Thu, 10 Dec 2020 20:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728524AbgLJUnk (ORCPT ); Thu, 10 Dec 2020 15:43:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbgLJUnk (ORCPT ); Thu, 10 Dec 2020 15:43:40 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5230C06179C for ; Thu, 10 Dec 2020 12:42:30 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id s21so5226284pfu.13 for ; Thu, 10 Dec 2020 12:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cjB3r8SZqFV5P65K6NFvrSaUGRWdy0OJ/fgRJixjirs=; b=LYZHS+GDpzMpUjAK/mnDLYbzuOH1UbPLTxyNCqCRuijJYkevsB2rQ5+6+SGbyOUx/Z lDERdJWQEXlIzpLW5N3g2Lw5tulUAldOhBAOKL7OHwJop1LcUIP/sw8jIiWSDGSIrB05 KJNG5IpuLvLQ1SVkiADTQJyDfDPv9KJkoFuRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cjB3r8SZqFV5P65K6NFvrSaUGRWdy0OJ/fgRJixjirs=; b=cIBKt4d1CIEn3LmOEges7iL93ATHx6KL2pMr6nNNwGaraU8gsqugR/doVHOi4gKmpc JiLFxIMj/b8rDeiWK1B1jqBubG7sR2EXlNiU1Yiv6F25ugznjIE3I06d6elm4TIgf5Li tHmVtk5rb4ye7KcxfRAS8M0MlODJWal43gr2ZILUYreWlF0fw7v2/aUpVf/9+DY8sQbL D7uFXKXbjNNejkvo/0UmtHk9PtySdt3OYkCxKouzaSt/unbdQGgNTHq42H0gEnQPn/L7 ai0uCkAMVYx1oZFjD3niFUiAHSTojVG2hbjUSHc47eGnGV3TFf2pjYo1PWe1oEggEJGv +O6A== X-Gm-Message-State: AOAM530KFDgLoc0CaSHjl993M3Mo9BFOM//yQbUzwo5tuh1EQzBuVChm cFGxJiyDnWsFQojGGtEDnV0Mmzu9MDEuzg== X-Google-Smtp-Source: ABdhPJzAAcSymOU9jc5ky75MzZJV5juIwCZYjsWrT1wBYrxGlXkDVbZqsJ4iY1VahKqsbfjmeaIq8w== X-Received: by 2002:a63:f910:: with SMTP id h16mr1569785pgi.77.1607632950311; Thu, 10 Dec 2020 12:42:30 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id w2sm7653388pfb.104.2020.12.10.12.42.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:29 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 5/7] iio: lmp91000: Remove code to set trigger parent Date: Thu, 10 Dec 2020 12:42:09 -0800 Message-Id: <20201210204211.967018-6-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Already done in boiler plate code Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/potentiostat/lmp91000.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index f34ca769dc20..8a9c576616ee 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -322,7 +322,7 @@ static int lmp91000_probe(struct i2c_client *client, return PTR_ERR(data->regmap); } - data->trig = devm_iio_trigger_alloc(data->dev, "%s-mux%d", + data->trig = devm_iio_trigger_alloc(dev, "%s-mux%d", indio_dev->name, indio_dev->id); if (!data->trig) { dev_err(dev, "cannot allocate iio trigger.\n"); @@ -330,7 +330,6 @@ static int lmp91000_probe(struct i2c_client *client, } data->trig->ops = &lmp91000_trigger_ops; - data->trig->dev.parent = dev; init_completion(&data->completion); ret = lmp91000_read_config(data); From patchwork Thu Dec 10 20:42:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C402C433FE for ; Thu, 10 Dec 2020 20:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA68823DC4 for ; Thu, 10 Dec 2020 20:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725997AbgLJUnk (ORCPT ); Thu, 10 Dec 2020 15:43:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnk (ORCPT ); Thu, 10 Dec 2020 15:43:40 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC4FC0617A6 for ; Thu, 10 Dec 2020 12:42:32 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id w6so5266640pfu.1 for ; Thu, 10 Dec 2020 12:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SkXWsgyMza+MJug/X7o6qOcfZ33JOJqqhO1OwPTe9hI=; b=cI66jCZFpuG3hg/+UMOYUZmemA4dljtf6aOEegtXH2flt9GJUDkMXfyvHQVpksDfhj chs0aVb+vlQSTIUrV34GkOwpuSh3uKIVCHAgtHWz5nYVwZ/cde/2wxnKzGzhwSfq0nEV Y/ezNhERfas/G02/FJWWU1uDTadsjZPCZepcQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SkXWsgyMza+MJug/X7o6qOcfZ33JOJqqhO1OwPTe9hI=; b=Nd8lNqgH8bU7vKslA8Qh6ciHLZL8Xw0M03hH7jJTm56vyjqJ9eOxhttYgVdtlvuFRm rMvxg+JAaJW8CCbYWFduTiza+tq7flYzzpVwMZ8LXexaGfmMD2wtuu5jrgPUjpbi/22e BjZx5xNUSrLcakSGQmq9x6yTWFsA8EHe/6PPITKp5Nrgq6SjUEarlI42iYklPXO/aYL6 WW5F7WLGmAs//SEAtfjm/2EdD1KC7+r0YEnryDLK4nov6yxz3T3YxBd4GVNu0t4QG9Fs qcrU8uzYxFjOyYbFakmMib1YWnUhuvl1ACrtxyZ1Y3aW9hWK8XxSzzWrFxRzNagFATtz 8J7w== X-Gm-Message-State: AOAM532hNR6xCtgQkjssFXSgj6+uQsyb9wMG+/AzZVQuu/lQral5jB2c 2UrzhrEIlefIbRnnHsc13BGqfw== X-Google-Smtp-Source: ABdhPJzyoKJmGh/hE+AxC2wB6TgcGbI+vAiBcWG9WgEaLEZFBTE3mMmLYrz+iORxLbP65wsNysygWw== X-Received: by 2002:a17:90a:c085:: with SMTP id o5mr4888874pjs.210.1607632951951; Thu, 10 Dec 2020 12:42:31 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id o2sm7145128pgi.60.2020.12.10.12.42.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:31 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 6/7] iio: chemical: atlas: Remove code to set trigger parent Date: Thu, 10 Dec 2020 12:42:10 -0800 Message-Id: <20201210204211.967018-7-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Already done in boiler plate code Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/chemical/atlas-sensor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c index cdab9d04dedd..56ba6c82b501 100644 --- a/drivers/iio/chemical/atlas-sensor.c +++ b/drivers/iio/chemical/atlas-sensor.c @@ -649,7 +649,6 @@ static int atlas_probe(struct i2c_client *client, data->client = client; data->trig = trig; data->chip = chip; - trig->dev.parent = indio_dev->dev.parent; trig->ops = &atlas_interrupt_trigger_ops; iio_trigger_set_drvdata(trig, indio_dev); From patchwork Thu Dec 10 20:42:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 11966495 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29461C4167B for ; Thu, 10 Dec 2020 20:43:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D347023E21 for ; Thu, 10 Dec 2020 20:43:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389519AbgLJUnm (ORCPT ); Thu, 10 Dec 2020 15:43:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgLJUnm (ORCPT ); Thu, 10 Dec 2020 15:43:42 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044E2C0617A7 for ; Thu, 10 Dec 2020 12:42:34 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id p6so3390376plr.7 for ; Thu, 10 Dec 2020 12:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JQCmL9CEGtjCHvQ1YCoS9503FiRLG82FOEJ8bL/K3Rs=; b=I/43om/D0wlbRn2MiEcJo5pc5JLldMHZ09AVU5UAJtLDY+4n5Wz6NuRgbGx+FUldN+ LNgmoQ/S0ZdCineQApqe/h9MWdoPXhh5m/oGVon7+yHEaYFKFem7hS7uLrijROnQjH+M 2zcQIcUyZKbXuwyDQ05CULDW1/uc1QkXMnyOQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JQCmL9CEGtjCHvQ1YCoS9503FiRLG82FOEJ8bL/K3Rs=; b=Fz3w1yYVb3uKmqGFxqk4yRByz8kMa6FxphxCuU0h5iM8qS9hsN4qmsHTQhrl+M22DB c/TLmYmD8KhgI8U3UagDasg/uRvbrHool7ltmBg7zN6HK/b6SJLgHbYrkAALbMe3/Ps4 QWbb6bBdgB2TqCGCYbvGLiX4fVOn4EG9Y7fav3m4VyWzlAPLJoPEQCgTjkt1ENS52fXg iNB/hqmPvA1m653yK3huGcZ2vqOrTSn5iNyGDp9OXPPLFs5BA800j1PQk52Q4LtWxAul vWPlaN4tPHBIp3GY+SR9NoSVao4YaTLNN7/pGWRSYo5kyQVvVHirgzIqgRlv8X5SHbUt jbXg== X-Gm-Message-State: AOAM533/Nz5+1XJgswNHEgYFaHppmaTDB/gIdQQJRSZaJQiRLiHpR4S8 V1CibCGEaDhdKUzeipv6Bw09rA== X-Google-Smtp-Source: ABdhPJzCDiV4pxEZ09H8wPcSND8P3VKjSgcNzV3nD5m1NcKRAudiR8xxmF5/bNuiJd3XMpvJyjUW5g== X-Received: by 2002:a17:902:7606:b029:da:246c:5bd8 with SMTP id k6-20020a1709027606b02900da246c5bd8mr8004552pll.27.1607632953619; Thu, 10 Dec 2020 12:42:33 -0800 (PST) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:94fe]) by smtp.gmail.com with ESMTPSA id a14sm7435925pfl.141.2020.12.10.12.42.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 12:42:33 -0800 (PST) From: Gwendal Grignou To: jic23@kernel.org, lars@metafoo.de, andy.shevchenko@gmail.com, ardeleanalex@gmail.com Cc: linux-iio@vger.kernel.org, Gwendal Grignou Subject: [PATCH v2 7/7] iio: as3935: Remove code to set trigger parent Date: Thu, 10 Dec 2020 12:42:11 -0800 Message-Id: <20201210204211.967018-8-gwendal@chromium.org> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog In-Reply-To: <20201210204211.967018-1-gwendal@chromium.org> References: <20201210204211.967018-1-gwendal@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Already done in boiler plate code Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean --- drivers/iio/proximity/as3935.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index b79ada839e01..edc4a35ae66d 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c @@ -411,7 +411,6 @@ static int as3935_probe(struct spi_device *spi) st->trig = trig; st->noise_tripped = jiffies - HZ; - trig->dev.parent = indio_dev->dev.parent; iio_trigger_set_drvdata(trig, indio_dev); trig->ops = &iio_interrupt_trigger_ops;