lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a8f0aaa1-e412-18c1-452f-753e0a6b6d51@wolfvision.net>
Date:   Fri, 31 Mar 2023 14:28:17 +0200
From:   Michael Riesch <michael.riesch@...fvision.net>
To:     Sebastian Reichel <sre@...nel.org>
Cc:     Gerald Loacker <gerald.loacker@...fvision.net>,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Ravnborg <sam@...nborg.org>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCHv1 3/7] drm/panel: sitronix-st7789v: add SPI ID table

Hi Sebastian,

On 3/18/23 00:23, Sebastian Reichel wrote:
> SPI device drivers should also have a SPI ID table.
> 
> Signed-off-by: Sebastian Reichel <sre@...nel.org>
> ---
>  drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> index bbc4569cbcdc..e4d8dea1db36 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> @@ -394,6 +394,12 @@ static void st7789v_remove(struct spi_device *spi)
>  	drm_panel_remove(&ctx->panel);
>  }
>  
> +static const struct spi_device_id st7789v_spi_id[] = {
> +	{ "st7789v" },

Minor suggestion: The format

static const struct spi_device_id st7789v_spi_id[] = {
	{
		.name = "st7789v",
	},
	{ }
};

is more verbose, but can be extended easily.

> +	{ }
> +};
> +MODULE_DEVICE_TABLE(spi, st7789v_spi_id);
> +
>  static const struct of_device_id st7789v_of_match[] = {
>  	{ .compatible = "sitronix,st7789v" },
>  	{ }

The same holds for this structure here (you may want to consider this
when adding the .data field in patch 6/7.

Best regards,
Michael

> @@ -403,6 +409,7 @@ MODULE_DEVICE_TABLE(of, st7789v_of_match);
>  static struct spi_driver st7789v_driver = {
>  	.probe = st7789v_probe,
>  	.remove = st7789v_remove,
> +	.id_table = st7789v_spi_id,
>  	.driver = {
>  		.name = "st7789v",
>  		.of_match_table = st7789v_of_match,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ