Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp82836rdb; Sun, 14 Jan 2024 07:29:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRD1DBISmVWv7KAUXRhV2DSSzTMCrWFPQg+fcznx/qQDVgRoGfMwXMgHq+lkCSHOPvUaTc X-Received: by 2002:a05:6402:26cd:b0:554:4d7f:a054 with SMTP id x13-20020a05640226cd00b005544d7fa054mr2115140edd.1.1705246140281; Sun, 14 Jan 2024 07:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705246140; cv=none; d=google.com; s=arc-20160816; b=LiejXlPgDDPmy1VMQb7AJ3ZCmepphWfvSwOJ2OmC8jEYEGr3GXP6HLBu0eynN+8uVk jl9OwrN8EyAMNWIxARKICjvykJAFXk1kxs+ZqI0H+iai3wezzaw73QtAjq2sBs+FwgrC lEP2Joy/V+pbcTmjtoSSauqlt1eY2JzBfJ1rlj9OQ3ci04Ck5RZ1mTGfZ/MIs+9QfLyF U8nXgQuBslH0nk95Iukf4yqK2YbL3Usn08NeI+KgKDM7LRzwqZv8yolIgchfFXw1n2LR 7JnSXGXmxnsRUoXB4FFKg16XxELw5GnyczrH9pfUbuUEy93nSwG2ci6wLA0mErRoNgVa rKoQ== ARC-Message-Signature: i=1; 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=qJn+PjOdFPmUPiS9+ZOA25y5NEgcU0XSxO4x0Edr/T4=; fh=mgFXmQvNwPRRqTo0F2bG2XoRFpGxhFpM0UrwgLf/FtA=; b=E2u2W3J0mrKZU2QaYLlyVoPTrT13iffSUZEzbH7Gt9Qp+JpGM7NZbWkuTPE6QNF4BI y3wKGO+ZAa9t1cOX7JDhK0oajDWkyyHFflgAL3D2o18uHEIS8OsilEhBbeuY4rYZ1rYG 6No3EakChevbUZPLnl0BOKl/hoW9U7kJ+q1bVsQj/wEwKmjYmcIJmXfyztL04PwCX08O OA0aAYs9FXyOlH29NIKhKP4CAb8xlaWAopA/4DSo+tXkwrkFmAWOAXyuwIikEdxZRgzL Zc+uMljureWbyuYNIhMsftZctbmYF2C6JgtUasnA1p4gUI8P23wgWcKDkNhUdOVmCmjZ LFmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="P6vUiQ/z"; spf=pass (google.com: domain of linux-kernel+bounces-25505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b7-20020a056402084700b005591a22e2b4si828736edz.461.2024.01.14.07.29.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 07:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="P6vUiQ/z"; spf=pass (google.com: domain of linux-kernel+bounces-25505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25505-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0DAB61F214E4 for ; Sun, 14 Jan 2024 15:29:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5296AD30E; Sun, 14 Jan 2024 15:28:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="P6vUiQ/z" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 39E94524B; Sun, 14 Jan 2024 15:28:08 +0000 (UTC) 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=1705246088; x=1736782088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HHwu/+ttKG6+gQ16tPnQoTnLOBcKuPt3xGBj8B08rW8=; b=P6vUiQ/z8+ClUM7MsCyEGN1OUnmuQNa+KxhMopg0SkJM7RyQ1FN1GqF3 Ex1g8eIOQ9PaRBJcqw1TcR+o+ZsZwyxbwVsqoPSIasDp/waa+jcW+hplO d7sYUA+ThVp8OJjgm4p13DLOqskf2zNKPLb2O8Cv1g9tIcuM0TZWru2xe HeV1jOnkYfdogEmVIIAyUR8GU6wjumRzPs/ioJT2RytNlhyxEg+jC/gLY S37Sa0beihIys/vdVatI5QWqxFp6C/sYqRX2yvA7M+QVYp46WW0QvGVV5 4NVvBnJwR4x7ppM9i1W0JACCBHYzZk/8p6F4NPfkHw74IlfKSlpmiQnYW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="6829681" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="6829681" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 07:28:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="956601547" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="956601547" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 14 Jan 2024 07:28:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4D3D039B; Sun, 14 Jan 2024 17:28:02 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Subject: [PATCH v1 4/4] backlight: hx8357: Utilise temporary variable for struct device Date: Sun, 14 Jan 2024 17:25:11 +0200 Message-ID: <20240114152759.1040563-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240114152759.1040563-1-andriy.shevchenko@linux.intel.com> References: <20240114152759.1040563-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 pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko --- drivers/video/backlight/hx8357.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index fbe02fd73272..e4dc76f25f8e 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -574,7 +574,7 @@ static int hx8357_probe(struct spi_device *spi) hx8357_init init; int i, ret; - lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); + lcd = devm_kzalloc(dev, sizeof(*lcd), GFP_KERNEL); if (!lcd) return -ENOMEM; @@ -604,8 +604,7 @@ static int hx8357_probe(struct spi_device *spi) gpiod_set_consumer_name(lcd->im_pins->desc[i], "im_pins"); } - lcdev = devm_lcd_device_register(&spi->dev, "mxsfb", &spi->dev, lcd, - &hx8357_ops); + lcdev = devm_lcd_device_register(dev, "mxsfb", dev, lcd, &hx8357_ops); if (IS_ERR(lcdev)) { ret = PTR_ERR(lcdev); return ret; @@ -618,7 +617,7 @@ static int hx8357_probe(struct spi_device *spi) if (ret) return dev_err_probe(dev, ret, "Couldn't initialize panel\n"); - dev_info(&spi->dev, "Panel probed\n"); + dev_info(dev, "Panel probed\n"); return 0; } -- 2.43.0.rc1.1.gbec44491f096