lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] x86: pcengines apuv2 gpio/leds/keys platform driver
On Wed, Feb 13, 2019 at 10:57 PM Enrico Weigelt, metux IT consult
<info@metux.net> wrote:
>
> Driver for PCengines APUv2 board's front LEDs and Button,
> which are attached to AMD PCH GPIOs. Due to lack of dedicated
> ACPI entry, detecting the board via DMI.

> +#include <linux/init.h>

> +#include <linux/module.h>

One of them is not needed.

> +static struct platform_device * __init apu_create_pdev(
> + const char* name,
> + const void *pdata,
> + size_t sz)
> +{
> + struct platform_device *pdev;
> +

> + pdev = platform_device_register_resndata(
> + NULL, /* parent */
> + name, /* name */
> + PLATFORM_DEVID_NONE, /* id */
> + NULL, /* res */
> + 0, /* res_num */
> + pdata, /* platform_data */
> + sz);

No need to comment the obvious.

> +
> + if (IS_ERR(pdev))

> + pr_err(KBUILD_MODNAME ": failed registering %s: %ld\n", name, PTR_ERR(pdev));

Better to set pr_fmt() macro at the top of source.

> +
> + return pdev;
> +}
> +
> +static int __init apu_board_init(void)
> +{
> + int rc;
> + const struct dmi_system_id *id;
> +
> + id = dmi_first_match(apu_gpio_dmi_table);

> +

Redundant blank line.

> + if (!id) {
> + pr_err(KBUILD_MODNAME ": failed to detect apu board via dmi\n");

pr_fmt()

> + return -ENODEV;
> + }

> + pr_info(KBUILD_MODNAME ": initialized: gpio, leds, keys\n");

Noise.

> + return 0;
> +}

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-02-14 03:15    [W:0.179 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site