Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3299287pxv; Mon, 26 Jul 2021 00:21:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj2nSZoNMr9uc1p9egaAKAnzNaglezYaT1KL0Td5E3YPyudTxfRTC2yyVsLUw00UZMVPQk X-Received: by 2002:a05:6e02:1a28:: with SMTP id g8mr12138959ile.128.1627284101391; Mon, 26 Jul 2021 00:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627284101; cv=none; d=google.com; s=arc-20160816; b=mK7+tuCygU1VWv4Vh/1VOjIkEumshTsWWFVzS57PA5DvyBAo4v2rCMK5vIAfRyRnQd BVlFTai64w/vv5WhtfIuloikrB2mpDJIIvx6XaOH35rskv90Z42BH3PK8G/IEM4QvV1h N0656hsD5LWfM1eQpIgKC2jyzcORsOz2ItLw9Vfxf3bZLpVHJz4IG1jR0Ktu4XyjvISe hte+uGC6nJhsaFhFT0nzAhBEf9WZadxlwYplhUcmKTaSN+7GDC8CCsqOeEdbIJ5bMDFM dvqwvWXACYGOK0ljZwZ57iUT9q34kMpZ34LXfvK8yPbJ1aDl9VtXWXnwBdTkeVUjZUBD OoeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8tWhQCl1p8bzV21p6F+aEhldPxkV5yakQenolKk9Fjk=; b=HfSMTrzjzhzjNSneHb/R5tm3/jajUPOW8kvT+6HUzPPKHvSAbL5P1G6bPhlESf9kjn zIwIOzT5zvk/DafTSGY1QRGeIiS+SD1RdaEUJXaahmxQkPIwOcsGmsaKzhaDi0+c5+fK SGtqaMwUBUDuMfOfdbzjmFKo8GE1tot1s8yELEligWO7ZYIn+nYODOrEN+j79RHVjIoQ Q8OC17wVKNQvwkYWbHk5GAUuhPHbv3pa8XAlxXUKV5K+YTsMO83fI7EVeGMnBNKQ2gwu YhWs3HAaJ0E/vAsrboKaBnvVL43pLxwqo6pfjMb6Rcm3UHeD5uA7OqUhU6FPzLN3/m6s sJgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KGKxq0qz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si29448069iow.27.2021.07.26.00.21.29; Mon, 26 Jul 2021 00:21:41 -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=pass header.i=@gmail.com header.s=20161025 header.b=KGKxq0qz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232190AbhGZGkQ (ORCPT + 99 others); Mon, 26 Jul 2021 02:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231874AbhGZGkP (ORCPT ); Mon, 26 Jul 2021 02:40:15 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1FFEC061757; Mon, 26 Jul 2021 00:20:44 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id z7so9757309wrn.11; Mon, 26 Jul 2021 00:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8tWhQCl1p8bzV21p6F+aEhldPxkV5yakQenolKk9Fjk=; b=KGKxq0qzpRqdLkRZKwiF6sYC6KA0ZWB4eKk5hi8spunEUcdlPvlGI0+MU0Ic3BTbG2 sWfEVTMG4/+y3W2ActepUxwMgC1BKkUVdkOdGnZSiHJeLKc1M5UhW+T7I+sIf6Mennm9 Uxj8L0gpuSYiZ04FYf+l1QMlIHPUGlsRE+uCgj2rdXKj4YV+ucTixA1eOqQDkJ+PCYef H17mxLPwSjFIKRTyFxUJlJz5avAxusg0OVurhUgV9ggMYsNgFIjpdXRnUL8ry2yfhkNz /Bcn5YprnpdIu82OONatZlvqGkPd8qBO1tl0I0ifBuhmRiNpKFUe1zWwnRFokAVINqiM qBgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8tWhQCl1p8bzV21p6F+aEhldPxkV5yakQenolKk9Fjk=; b=cNwMjRKY7UxHLjH5eH/7GPHa5VO6knkNlAKPq4KJ/TmgmeuAjJKobxZd8vy7rnBAu0 6ofAQfVfNVRGE5grw5hI2wPpmSkeTrxL5xCncDrmSMANmQBX8uQ0fmXFnDnyoYQY4XY0 W5LqIHbEvLiyI0ygkIAmqvvCn3VZHNH7UV7peGkngAU2s2ZxBw+Qun45hREap71bCBC2 fig0tIICBbKbAMpZS9FKsR6dhLtClI9s9GNmrlngRJcJ+oTdrTz+K2AcTu49ST8CoF5A WC3xq8B0qiZwmddj8cqXhMeWb2PZpO35DwE8Y2QSr+n+fxrHjncI6e5vF0YNJbx6q74o YV9g== X-Gm-Message-State: AOAM5306fA5XylvIojfjcqq2OijH6abpDLsFEGbTD8GLKfL6/NJmvlu6 woRRAsIUBKMLOzYHmBNhbwkgBNuixRwVl49RZyY= X-Received: by 2002:adf:ec0c:: with SMTP id x12mr18281237wrn.113.1627284043603; Mon, 26 Jul 2021 00:20:43 -0700 (PDT) MIME-Version: 1.0 References: <20210726071404.14529-1-aardelean@deviqon.com> <20210726071404.14529-4-aardelean@deviqon.com> In-Reply-To: <20210726071404.14529-4-aardelean@deviqon.com> From: Andy Shevchenko Date: Mon, 26 Jul 2021 10:20:07 +0300 Message-ID: Subject: Re: [PATCH 3/4] iio: st_sensors: remove all driver remove functions To: Alexandru Ardelean Cc: linux-iio , Linux Kernel Mailing List , Denis Ciocca , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 26, 2021 at 10:14 AM Alexandru Ardelean wrote: > > At this point all ST driver remove functions do iio_device_unregister(). > This change removes them from them and replaces all iio_device_register() > with devm_iio_device_register(). > > This can be done in a single change relatively easy, since all these remove easily > functions are define in st_sensors.h. defined > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.h | 1 - > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 15 +-------------- > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 6 ------ > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 6 ------ I will check these later on, but the rule of thumb about devm_*() is that there shouldn't be gaps (non-devm) before any devm call. -- With Best Regards, Andy Shevchenko