Received: by 2002:ab2:7853:0:b0:1fa:5c73:8e2d with SMTP id m19csp26931lqp; Thu, 30 May 2024 10:53:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4DUmHpIIYqMyP7PQqCHP8kI3mVtOC+ICguc2NHBjRYG9s93bCFlTZq7NGBo6C93BiXLqYnFAMIvdfmTQ2Reu/0auX8Cd1vdjZNzfYyw== X-Google-Smtp-Source: AGHT+IGda2OYCGP8pf5EcJHupwo4hvEbyROxlqzOinRO+hfvAPvfQprD29DnkMRCcQUmYxD9UZF2 X-Received: by 2002:a17:903:1d2:b0:1e7:eeb3:e295 with SMTP id d9443c01a7336-1f61a3ddc6bmr38963295ad.69.1717091611419; Thu, 30 May 2024 10:53:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717091611; cv=pass; d=google.com; s=arc-20160816; b=gBcnaCN4kYd0PHjcFJudn8CVfy5vk/gtjvzXsjSWn7i8KNZ1POO+6gSJ9W8dD1wasK 95Fs6QSBmDIWHF1VI4PWnIe26oTRFjPAkuojv7pUMUvI9vsdCXZAQlNF7AI/e7H5pp0m 4IjW/0S4pSOtDEDQCPeF9gvnKiHjoZ1Cebv0yNy+D9kSHsQNosSG5TAyxgS+3DqOfLWG 565tmiG4Ay05PA4PMbwXeqk7P2P6TS7T50fFOAFp9FpVrgi6FPJXGbqUtl3PYvI9Bxvl /AoshAYGIBYL/pNJyOnbq3hIZ76/0lzXO9JkfOG/bMDDpM4qYusFFqp9JT4nyhJsF69B HeYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1FjXEfDDAu4LtpAPuiABlqQ0B9GWAgpTQHqbmUGE1j8=; fh=LDKqGB8ZNl8NmJgUmuofQ9Azw0SMDgDBwSQzUt/rWWA=; b=z5pROHioiazHpxYOb/lL8zsVooTK3Ba0onWA4WAQib7UapbpdQj4Gc21ciUzTPP+vw nOxEhR++S0YWiAZeUzwmWTeBmck3i3PJUCKgjvExh4DgKmfqsK6NlQPR5TbojpMkaUpe rU5VQQ3tYf76Xk9VgjsU4BHH4/BaDuo1yNAxLhUBDobemdlwEgtcxSfxp6glvXZL0dTt 87NFqMKvsLHtEY97C3Sl4z2M9jdsSvt4Gh4SpPM9IJG99It7fzoZsCaQJWKG5kzZtE31 BDslzPLd3AibXWgX5aMtxxuGgtkp7c1usUjgPk0zR8MOfPuXGPbfLXKtvmxqJT5uOIKT f/QQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dVqKUWX2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323ec88asi804285ad.425.2024.05.30.10.53.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 10:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dVqKUWX2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7C55AB24A50 for ; Thu, 30 May 2024 15:12:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E18A1862BF; Thu, 30 May 2024 15:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dVqKUWX2" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E479183092; Thu, 30 May 2024 15:11:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717081887; cv=none; b=V1IFi6Y9dEWRgKamt5x6uc057e/nrHACsAb7bRO5NwZ0wEGRnkxEztn3QMNu5NArcqgDtgXvlRaf5Us8qZ4c2htuh2ptHDNOQM9824QapIxMdFTi1JpzYBiLGWqqWECWYyxWCpHOo9jGATvRYbo8xgtIQ5CJh5uPD883UuhOjwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717081887; c=relaxed/simple; bh=M+NbhDPEqKAfXCCJumrA9VHagNYen39iF9Q6cbbh/Yc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J+R/ltuLp9CVC0qiVtXOEZGcD4r08kFFnShRShxu+Zw22JAEe/qjGbkFiUrqDauiZ2Cy3Obx0hs2vmmUBOCLGdLkMpHLHcC37xgENMj1A7sQ20UV5mdu9lKTSM6hOfTZzi4lc4E+4WyHpK2W7nUoakkN10y6HjH4bxhnHrdLS30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dVqKUWX2; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717081886; x=1748617886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M+NbhDPEqKAfXCCJumrA9VHagNYen39iF9Q6cbbh/Yc=; b=dVqKUWX2xg8zg9bUpbFtGs5szUbFxp1CjO4CU8QNjIymmM+UVw9bG+tc xAVCB21KKhdChaiOWN8KYbcmYKbANh3UJrfNC10PVCBsqRBUPk+ql7qsw n5K/eLFnTm0TJ8P/wCTeDdp/h4TlSKLK3WFK838Ji6ncGpPnVgUaj/oMS 8kE6pgFu4gObBw9yLnFwEEObs6REb0OkT8s8KSriwkTMaWi7aF36NJczD wMipWgK7nYlpBdrlpYJ2sGdG/iqeq2QI0VinvWqsxbfQ7NUFu68ArAHGl kdu9c7yYxvSEIXuuBNJq6i0Wo5zxIRNoFk3JfD0026c4q5FrHOLwEiACF A==; X-CSE-ConnectionGUID: RVvFNXKdSAKoKYSPSHFGow== X-CSE-MsgGUID: kxOZJfLTTOSTRar7dxAGXw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="31093050" X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="31093050" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 08:11:25 -0700 X-CSE-ConnectionGUID: qt//DRy9Sc+BayjLWr0qfw== X-CSE-MsgGUID: 55oDytf2S8+9oqMNTbMdmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="40288502" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa005.fm.intel.com with ESMTP; 30 May 2024 08:11:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 57AEF6AB; Thu, 30 May 2024 18:11:19 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , Linus Walleij , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik Subject: [PATCH v2 05/11] spi: pxa2xx: Utilise temporary variable for struct device Date: Thu, 30 May 2024 18:10:01 +0300 Message-ID: <20240530151117.1130792-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240530151117.1130792-1-andriy.shevchenko@linux.intel.com> References: <20240530151117.1130792-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit We have a temporary variable to keep a pointer to struct device. Utilise it where it makes sense. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 53815aab41aa..19ee7739f4bd 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1606,13 +1606,13 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) } } - pm_runtime_set_autosuspend_delay(&pdev->dev, 50); - pm_runtime_use_autosuspend(&pdev->dev); - pm_runtime_set_active(&pdev->dev); - pm_runtime_enable(&pdev->dev); + pm_runtime_set_autosuspend_delay(dev, 50); + pm_runtime_use_autosuspend(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); /* Register with the SPI framework */ - platform_set_drvdata(pdev, drv_data); + dev_set_drvdata(dev, drv_data); status = spi_register_controller(controller); if (status) { dev_err_probe(dev, status, "problem registering SPI controller\n"); @@ -1622,7 +1622,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) return status; out_error_pm_runtime_enabled: - pm_runtime_disable(&pdev->dev); + pm_runtime_disable(dev); out_error_clock_enabled: clk_disable_unprepare(ssp->clk); @@ -1636,10 +1636,11 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) static void pxa2xx_spi_remove(struct platform_device *pdev) { - struct driver_data *drv_data = platform_get_drvdata(pdev); + struct device *dev = &pdev->dev; + struct driver_data *drv_data = dev_get_drvdata(dev); struct ssp_device *ssp = drv_data->ssp; - pm_runtime_get_sync(&pdev->dev); + pm_runtime_get_sync(dev); spi_unregister_controller(drv_data->controller); @@ -1651,8 +1652,8 @@ static void pxa2xx_spi_remove(struct platform_device *pdev) if (drv_data->controller_info->enable_dma) pxa2xx_spi_dma_release(drv_data); - pm_runtime_put_noidle(&pdev->dev); - pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(dev); + pm_runtime_disable(dev); /* Release IRQ */ free_irq(ssp->irq, drv_data); -- 2.43.0.rc1.1336.g36b5255a03ac