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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no 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 240B2C433DF for ; Sun, 28 Jun 2020 19:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFBF820702 for ; Sun, 28 Jun 2020 19:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593371794; bh=TK+rmjWQLyODDh9jTs8Zv7uXG6iVJsIGa7r7WUq1PxE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=sjHMicsE+ylHiqmq0s2ZKL2qIRlVCFB72oPfS5hfE22WgTi7ORUFvDYqV/nllxbtp zk5Fg+Icq8DOkm41RjCMJxsuzVIe7+xbZ/KI0vCPQYkP47SbSKKvs01V5oLX/4peaZ idmh6EJ9ZnNc0v6Ta2rkFEqW5TdAltOdo5M3pOyQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgF1TQd (ORCPT ); Sun, 28 Jun 2020 15:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:41774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbgF1TQd (ORCPT ); Sun, 28 Jun 2020 15:16:33 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F344C206F2; Sun, 28 Jun 2020 19:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593371793; bh=TK+rmjWQLyODDh9jTs8Zv7uXG6iVJsIGa7r7WUq1PxE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BzVH1MzJGF3X7eMT/lIi3kM2W2KaU3enyknylP7x0X/ULwDvEkeaYbsY3Gj7DRPmZ MylHwUviJHImLhpcQpUXkitukRwByqH5UQ8MQlxsxfp5+uYTVFDub7jvzGTCESEICA mFBzI3wZ05DNqnrXBXXknRk1CGd42UwF3PM0OnTc= Date: Sun, 28 Jun 2020 20:16:29 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio , Alexandru Ardelean , Jonathan Cameron , Quentin Schulz Subject: Re: [PATCH 02/23] iio:adc:axp20x: Convert from OF to generic fw / device properties Message-ID: <20200628201629.7c6541d6@archlinux> In-Reply-To: References: <20200628123654.32830-1-jic23@kernel.org> <20200628123654.32830-3-jic23@kernel.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, 28 Jun 2020 20:43:50 +0300 Andy Shevchenko wrote: > On Sun, Jun 28, 2020 at 3:39 PM Jonathan Cameron wrote: > > > Whilst fairly unlikely anyone will ever use this driver with anything > > other than DT, we are trying to move IIO over to the generic interfaces > > where easy to do so. > > > > In this case this involved moving to generic check on presence > > of fw_node, generic device_get_match_data and dropping the of_match_ptr > > protection. Also relevant header changes to have property.h and > > mod_devicetable.h only. > > ... > > > - info->data = (struct axp_data *)of_device_get_match_data(dev); > > + info->data = (struct axp_data *)device_get_match_data(dev); > > Casting is not needed, but if you remove it it reveals a hidden const > qualifier drop. > Doh. I should have noticed the odd cast.. Will fix up. Making info->data a const as well will tidy that up. Thanks, Jonathan