From patchwork Sun Sep 17 15:01:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 9954851 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 61A7E603F2 for ; Sun, 17 Sep 2017 15:01:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D45D28B02 for ; Sun, 17 Sep 2017 15:01:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423A228B04; Sun, 17 Sep 2017 15:01:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B3D728B0B for ; Sun, 17 Sep 2017 15:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbdIQPBH (ORCPT ); Sun, 17 Sep 2017 11:01:07 -0400 Received: from 78-11-180-123.static.ip.netia.com.pl ([78.11.180.123]:60058 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751645AbdIQPBF (ORCPT ); Sun, 17 Sep 2017 11:01:05 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 3xwC4v5BYXz7j; Sun, 17 Sep 2017 17:01:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1505660463; bh=J9hRWWULYighTFitbZobIZ4hMjWWgQPwT1JLkPE4GpU=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=DFQXunEoC6AJl6LNSYpDGnVLaQXnlt31ngMdKb+uuvhiBbUw98MkUxr1ZzRpUa7hS JaJU9NJbCSiTjZge/hEOrPe1fRB9Uev2KZ6/NtuNB7CffsMPX9a/mQaVudf1wXbkwQ 1WPNBzFL5K2x4XkE9hqygvWliYINKBtY8zsAXV9vw5JJGV3Z+CThrIc+eUOsIX5KGu kfQGvd6o/PzZ44SROTUlzCq14WFml4HF4qoakHVpVHs3AeV9cRxpBX8jjnqEhs5AN4 HCs0Ioc2vaUrvYYIUKt0Fz4FdyJoeyATyrwNfhm5fnJEb2T+SSUX8NLbvj/r7zUepk QSp+sBZK4lmOw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Sun, 17 Sep 2017 17:01:03 +0200 Message-Id: <11167c3b3ab21d89a755db885597d98af3cb6744.1505660069.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH v3 5/8] iio: accel: kxcjk1013: make sampling_frequency_avail per-type MIME-Version: 1.0 To: Jonathan Cameron , Srinivas Pandruvada Cc: linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sampling_frequency_avail per-type - like sampling_frequency is. Signed-off-by: Michał Mirosław --- drivers/iio/accel/kxcjk-1013.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 9b4f953c5782..4e8919d48635 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -889,12 +889,13 @@ static ssize_t kxcjk1013_get_samp_freq_avail(struct device *dev, return sprintf(buf, "%s\n", kxcjk1013_samp_freq_avail); } -static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(kxcjk1013_get_samp_freq_avail); +static IIO_DEVICE_ATTR(in_accel_sampling_frequency_available, S_IRUGO, + kxcjk1013_get_samp_freq_avail, NULL, 0); static IIO_CONST_ATTR(in_accel_scale_available, "0.009582 0.019163 0.038326"); static struct attribute *kxcjk1013_attributes[] = { - &iio_dev_attr_sampling_frequency_available.dev_attr.attr, + &iio_dev_attr_in_accel_sampling_frequency_available.dev_attr.attr, &iio_const_attr_in_accel_scale_available.dev_attr.attr, NULL, };