From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 A9D19C6778A for ; Thu, 5 Jul 2018 09:30:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DE4F21A17 for ; Thu, 5 Jul 2018 09:30:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DE4F21A17 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=loewensteinmedical.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753382AbeGEJao (ORCPT ); Thu, 5 Jul 2018 05:30:44 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:58970 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131AbeGEJam (ORCPT ); Thu, 5 Jul 2018 05:30:42 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 32BF741F98; Thu, 5 Jul 2018 11:30:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id 2A29D41F62; Thu, 5 Jul 2018 11:30:37 +0200 (CEST) Date: Thu, 5 Jul 2018 11:30:37 +0200 (CEST) From: Nikolaus Voss X-X-Sender: nv@fox.voss.local To: Andy Shevchenko cc: "Voss, Dr. Nikolaus" , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang , Javier Martinez Canillas , "linux-iio@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH v3 1/2] IIO: st_accel_i2c.c: Simplify access to driver data In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Jul 2018, Andy Shevchenko wrote: > On Tue, Jul 3, 2018 at 8:41 AM, Nikolaus Voss > wrote: >> Use device_get_match_data API to simplify access to driver data. >> Let acpi_device_id table entries point to the same driver data as >> of_device_id table entries and uniquify access to driver data by using >> device_get_match_data API. Remove unused i2c_device_id .driver_data >> fields. >> > > Couple of comments below, otherwise > > Reviewed-by: Andy Shevchenko > >> Signed-off-by: Nikolaus Voss >> --- >> drivers/iio/accel/st_accel_i2c.c | 56 ++++++++++++++------------------ >> 1 file changed, 24 insertions(+), 32 deletions(-) >> >> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c >> index 6bdec8c451e0..c6e08c834f11 100644 >> --- a/drivers/iio/accel/st_accel_i2c.c >> +++ b/drivers/iio/accel/st_accel_i2c.c >> @@ -14,8 +14,8 @@ >> #include >> #include >> #include >> +#include >> >> -#include >> #include >> #include "st_accel.h" >> >> @@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match); >> >> #ifdef CONFIG_ACPI >> static const struct acpi_device_id st_accel_acpi_match[] = { >> - {"SMO8A90", LNG2DM}, >> + {"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME}, >> { }, > > Is it done against iio-next? > > I see two records in this table. No, I'll rebase onto linux-next and resend... Niko ...