Message ID | 20240114152759.1040563-3-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-25504-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1248861dyc; Sun, 14 Jan 2024 07:29:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6JLv7zekUZJNIJvs4z3nBqculBrK8o0ypI9sjJWdnIFZlqZOAa9t5FBfpw5w/awt51/I7 X-Received: by 2002:a17:906:2404:b0:a2d:3488:c377 with SMTP id z4-20020a170906240400b00a2d3488c377mr917312eja.57.1705246168085; Sun, 14 Jan 2024 07:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705246168; cv=none; d=google.com; s=arc-20160816; b=WRgZK9Fpd9t2wk1HE1qEdweSsHLamC9sTQ9vgxutno+3wTz5O6INUiTEznG5UZJ2UJ nEH4xPDZjt50C//suTduj05xYy9KPcRZmU+JzTnMfzUSeJqGMuDSqfT/IqBewK6uqnGJ mLuoPnE56mzADeUuDB1h2/5yUU+r3Mq/1urZNkOJl4WC4xcWI+YfuWkc1kCg9A4C/6la DWxY9rX1tLBUthCYy994Eyf7oYoGTbS0k7LGolDOw16VbmLuPjBXdZQ1V+nqPBjT1XvE 8YYEHNK5t3LU5nFUXd69OoBq/je+6gR5OpVi1AyXQWhiK6HTgQI0PMWh0qH0K3Q9yQ0q 16pQ== 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=oFgUpDm4amPfxXzuxGAan3Yg5awNVd8AxxiL0keaT2I=; fh=mgFXmQvNwPRRqTo0F2bG2XoRFpGxhFpM0UrwgLf/FtA=; b=VvsbazhoCMY59AEQdSpj5u05RBc3SupP7WiZGnWCVo20Z0dTdGFfEjRvw/ARMHvnZa 1P6mYJF1lNdsAllPcayTgm9d3hERbxJxqHOg0/vIuf4Ga7eixgahoOQjqtzxLoutIs/K xRqclTUN/MEckrcg8poTy6T7HCqoIxHuIjz46YxWVUwhYmzFJBQhCRNOj5rIVzBqcW7D RS1kNs8KfPn9+33VEwGQCI3EfGth8lgQsZ1FwaysAP4CGY0iMzX0hD9dkFQzIwiDC6q9 C0p2Fgv46nVOyf9QwHH8BZzqFHcLV3c315+v24XJkXOEPVlVjjc6UTMNlcjAHveeSlUn AQ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lv2cvrH3; spf=pass (google.com: domain of linux-kernel+bounces-25504-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25504-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dt23-20020a170906b79700b00a2c35568f8dsi2952315ejb.781.2024.01.14.07.29.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 07:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25504-ouuuleilei=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=lv2cvrH3; spf=pass (google.com: domain of linux-kernel+bounces-25504-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25504-ouuuleilei=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 AEAC71F2121A for <ouuuleilei@gmail.com>; Sun, 14 Jan 2024 15:29:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F365314293; Sun, 14 Jan 2024 15:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lv2cvrH3" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 058625231; Sun, 14 Jan 2024 15:28:07 +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=gErb4SvLDcsU5HgGSgzQl+lRFtQWIMD24E+MzwAOiTg=; b=lv2cvrH3ZI/CZfvOKUvkZ1pRjK8AEWogUEIolZdWqIcY8h59JIRIrQeK Fl6sgPUpkWCmdftzgMeOgGACqFeogl//Iez6V1ueBoGoUoEnyvGH49XUA fkUSs8RcsVnbTrVoH3enng7yTqVgsCluuI5rxVojCEPM/YQ0U8y1OMbW1 t0dfRvnCAtFY7PHp7Uh9xF59EOGH2rZ+jTJvEcmLt4vg88cKl8VDz9wHv GTC5N9GkLFAQNHscDpttncI/yvwCunGwOUZA5CRCdf4b0q1yMOkzL+Z9H IOxH/d4qyWuY7QrRn/LNKCX8aPWBUSVOTMf1SeM6VKS0YkINsMnDUz1u7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="12835872" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="12835872" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa102.jf.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="1030429356" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="1030429356" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 14 Jan 2024 07:28:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3825C3AE; Sun, 14 Jan 2024 17:28:02 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lee Jones <lee@kernel.org>, Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de> Subject: [PATCH v1 2/4] backlight: hx8357: Move OF table closer to its consumer Date: Sun, 14 Jan 2024 17:25:09 +0200 Message-ID: <20240114152759.1040563-3-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788080205951066838 X-GMAIL-MSGID: 1788080205951066838 |
Series |
backlight: hx8357: Clean up and make OF-independent
|
|
Commit Message
Andy Shevchenko
Jan. 14, 2024, 3:25 p.m. UTC
Move OF table near to the user.
While at it, drop comma at terminator entry.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/video/backlight/hx8357.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
Comments
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes: > Move OF table near to the user. > > While at it, drop comma at terminator entry. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/video/backlight/hx8357.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c > index c7fd10d55c5d..8709d9141cfb 100644 > --- a/drivers/video/backlight/hx8357.c > +++ b/drivers/video/backlight/hx8357.c > @@ -566,19 +566,6 @@ static struct lcd_ops hx8357_ops = { > > typedef int (*hx8357_init)(struct lcd_device *); > > -static const struct of_device_id hx8357_dt_ids[] = { > - { > - .compatible = "himax,hx8357", > - .data = hx8357_lcd_init, > - }, > - { > - .compatible = "himax,hx8369", > - .data = hx8369_lcd_init, > - }, > - {}, > -}; > -MODULE_DEVICE_TABLE(of, hx8357_dt_ids); > - > static int hx8357_probe(struct spi_device *spi) > { > struct device *dev = &spi->dev; > @@ -640,6 +627,19 @@ static int hx8357_probe(struct spi_device *spi) > return 0; > } > > +static const struct of_device_id hx8357_dt_ids[] = { > + { > + .compatible = "himax,hx8357", > + .data = hx8357_lcd_init, > + }, > + { > + .compatible = "himax,hx8369", > + .data = hx8369_lcd_init, > + }, > + {} While at it, maybe add the { /* sentinel */ } convention to the last entry ? Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
On Mon, Jan 15, 2024 at 09:22:19AM +0100, Javier Martinez Canillas wrote: > Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes: .. > > + {} > > While at it, maybe add the { /* sentinel */ } convention to the last entry ? Maybe. Is it a common for this subsystem? .. > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Thank you for the review!
On Sun, Jan 21, 2024 at 03:49:23PM +0200, Andy Shevchenko wrote: > On Mon, Jan 15, 2024 at 09:22:19AM +0100, Javier Martinez Canillas wrote: > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes: > > ... > > > > + {} > > > > While at it, maybe add the { /* sentinel */ } convention to the last entry ? > > Maybe. Is it a common for this subsystem? I'd answer that slightly differently. Backlight does not aspire to be special regarding this sort of thing. If this pattern is becoming common within the rest of the kernel then its absolutely fine to use it here! There are certainly backlights that use this convention... although they are not yet the majority. Daniel.
On Sun, Jan 14, 2024 at 05:25:09PM +0200, Andy Shevchenko wrote: > Move OF table near to the user. > > While at it, drop comma at terminator entry. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Daniel.
diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index c7fd10d55c5d..8709d9141cfb 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -566,19 +566,6 @@ static struct lcd_ops hx8357_ops = { typedef int (*hx8357_init)(struct lcd_device *); -static const struct of_device_id hx8357_dt_ids[] = { - { - .compatible = "himax,hx8357", - .data = hx8357_lcd_init, - }, - { - .compatible = "himax,hx8369", - .data = hx8369_lcd_init, - }, - {}, -}; -MODULE_DEVICE_TABLE(of, hx8357_dt_ids); - static int hx8357_probe(struct spi_device *spi) { struct device *dev = &spi->dev; @@ -640,6 +627,19 @@ static int hx8357_probe(struct spi_device *spi) return 0; } +static const struct of_device_id hx8357_dt_ids[] = { + { + .compatible = "himax,hx8357", + .data = hx8357_lcd_init, + }, + { + .compatible = "himax,hx8369", + .data = hx8369_lcd_init, + }, + {} +}; +MODULE_DEVICE_TABLE(of, hx8357_dt_ids); + static struct spi_driver hx8357_driver = { .probe = hx8357_probe, .driver = {