Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp414334imm; Thu, 5 Jul 2018 02:31:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpclfIV6pZRwPjqLcUIyUIu4oKOM05EAYepdJHa6f9DM68ZATyeRABYl4Fam9HJM2TJLwMYL X-Received: by 2002:a17:902:c85:: with SMTP id 5-v6mr5451453plt.126.1530783114106; Thu, 05 Jul 2018 02:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530783114; cv=none; d=google.com; s=arc-20160816; b=kD7zMyNwShpumgx8ypxqDMmnVx/2m/oO3oQ+SRHc/m3KDxsD+7RYUfX3x1+o7NF+Ls Nfhy7Zi+1Kf+x4yuti3waPzg2C9rv0nsZzXaVIKw0X7yDkrOcfOEowEbcC4cuiKOc7Xq khQmbfcW16AJjEj68ezIIO97bgmvWvcOpYi9kKtA/q1tM2qNgFAjIA1xVLhG4kCwaQ+P jW5Nmou025g8snlTg75Jj+ohlGSM1Q9iAIN6EY/got1L1rJbWArfCN1sViZyCikWUyfU Rz8pnix+36gMas00jigR1I5oc9Zpa0aZXgL+6m8nPdAsXBHrc7JHP9At86J5WaGorK6h HoDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=FGwNhMSNzQbsUysqcM4LdKQOvdK1Kv4bHHG7KN4Xmp8=; b=SWNieNfkB7JUVEEC1H41vfBdt9efZ+wwphlTrirCgXUxriKsbm1R8BOrNmErWBchOF Zhy1EVMgY8Gxtbwhx74GGI0JzVNyty+AyWG9XWu/9k2ZFOEJm8gx8gFn8exyeGLT1+t+ hEaHWBKlXwwwkBgh6OC4PDHzw+vkq4iEyWtpxcxEVrxuqa8zB1snMJQoT6DtPphaCn59 nUPcStU7y8KrDfjAdzAmwGA3CAoV7EIK7D88RG88SP15DKeOAKHM7SF/WSc9nx3EOm3e 0jqvSdS+xVJqkdoUOgC4fdCNYOuHywYkQjbVAuH7sweHJxe+kkzhZUoPwweDkYZXHV/w 0yNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si5499130plc.452.2018.07.05.02.31.39; Thu, 05 Jul 2018 02:31:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbeGEJao (ORCPT + 99 others); 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 ...