Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752861AbcDRRME (ORCPT ); Mon, 18 Apr 2016 13:12:04 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:7793 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbcDRRMC (ORCPT ); Mon, 18 Apr 2016 13:12:02 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 18 Apr 2016 10:10:03 -0700 Message-ID: <571512B0.90303@nvidia.com> Date: Mon, 18 Apr 2016 22:30:32 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Stephen Warren , CC: , , , , Subject: Re: [PATCH 2/3] gpio: tegra: Remove the need of keeping device handle for gpio driver References: <1460969178-20914-1-git-send-email-ldewangan@nvidia.com> <1460969178-20914-2-git-send-email-ldewangan@nvidia.com> <57150B81.6040104@wwwdotorg.org> In-Reply-To: <57150B81.6040104@wwwdotorg.org> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRHKMAIL103.nvidia.com (10.25.59.17) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 754 Lines: 17 On Monday 18 April 2016 09:59 PM, Stephen Warren wrote: > On 04/18/2016 02:46 AM, Laxman Dewangan wrote: >> Remove the file static device handle variable as this is just >> required for prints. The required handle can be stored in >> tegra_gpio_chip and hence it become redundancy. > > This seems fine as far as it goes, but if it's worth doing this, > please move all the globals into the GPIO chip rather than just one of > the 7 globals. the device pointer is part of the gpiochip and so it is better to use gpiochip parent member instead of locally duplicating. However, moving to other global variables needs some major changes and I think it should be treated as independent of this patch. This patch just utilizes the gpiochip.parent here.