From patchwork Wed Apr 14 19:54:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12203657 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 68230C433B4 for ; Wed, 14 Apr 2021 19:54:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D4D661153 for ; Wed, 14 Apr 2021 19:54:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234239AbhDNTzF (ORCPT ); Wed, 14 Apr 2021 15:55:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:24033 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234221AbhDNTzE (ORCPT ); Wed, 14 Apr 2021 15:55:04 -0400 IronPort-SDR: YJXZP66igMd6NYI1XTDQ3+PnEpZqOTM7e0KSD7A77EU1vzbGGfzVha9S0Hbexmnc2qcYQuooCH 0Ojy/xDkAedg== X-IronPort-AV: E=McAfee;i="6200,9189,9954"; a="194746787" X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="194746787" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 12:54:42 -0700 IronPort-SDR: uIZik0HELf6Ho3DWaXwnW3kA6Ctv6iworPDgFeoiw1dnpyGBAWNEhcwykydtS0eKggA0Ft5qUW +pbAFTtA8o+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="424883201" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 14 Apr 2021 12:54:38 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 36FC712A; Wed, 14 Apr 2021 22:54:54 +0300 (EEST) From: Andy Shevchenko To: Jonathan Cameron , =?utf-8?b?R2HDq3RhbiBB?= =?utf-8?b?bmRyw6k=?= , Andy Shevchenko , =?utf-8?q?Nuno_S=C3=A1?= , Denis Ciocca , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring Subject: [PATCH v1 1/7] iio: accel: st_accel: Move platform data from header to C file Date: Wed, 14 Apr 2021 22:54:48 +0300 Message-Id: <20210414195454.84183-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Platform data is solely used by one file. Don't share it with others. While at it, drop unneeded anymore __maybe_unused and fix kernel doc to avoid warning: st_accel_core.c:1079: error: Cannot parse struct or union! by converting to a simple comment. It is described at the declaration. Signed-off-by: Andy Shevchenko --- drivers/iio/accel/st_accel.h | 8 -------- drivers/iio/accel/st_accel_core.c | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h index 5d356288e001..181ebe79c4eb 100644 --- a/drivers/iio/accel/st_accel.h +++ b/drivers/iio/accel/st_accel.h @@ -62,14 +62,6 @@ enum st_accel_type { #define LIS2DE12_ACCEL_DEV_NAME "lis2de12" #define LIS2HH12_ACCEL_DEV_NAME "lis2hh12" -/** -* struct st_sensors_platform_data - default accel platform data -* @drdy_int_pin: default accel DRDY is available on INT1 pin. -*/ -static __maybe_unused const struct st_sensors_platform_data default_accel_pdata = { - .drdy_int_pin = 1, -}; - const struct st_sensor_settings *st_accel_get_settings(const char *name); int st_accel_common_probe(struct iio_dev *indio_dev); void st_accel_common_remove(struct iio_dev *indio_dev); diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 43c50167d220..a1bd7e3b912e 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -983,6 +983,11 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = { }; +/* Default accel DRDY is available on INT1 pin */ +static const struct st_sensors_platform_data default_accel_pdata = { + .drdy_int_pin = 1, +}; + static int st_accel_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *ch, int *val, int *val2, long mask)