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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Jul 2022 23:41:31 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Henning Schild <henning.schild@...mens.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Linus Walleij <linus.walleij@...aro.org>,
        Tasanakorn Phaipool <tasanakorn@...il.com>,
        Sheng-Yuan Huang <syhuang3@...oton.com>,
        Kuan-Wei Ho <cwho@...oton.com>
Subject: Re: [PATCH 3/4] leds: simatic-ipc-leds-gpio: add new model 227G

On Thu, Jul 28, 2022 at 5:57 PM Henning Schild
<henning.schild@...mens.com> wrote:
>
> This adds support of the Siemens Simatic IPC227G. Its LEDs are connected
> to GPIO pins provided by the gpio-f7188x module. We make sure that
> gets loaded, if not enabled in the kernel config no LED support will be
> available.

...

> +       switch (plat->devmode) {
> +       case SIMATIC_IPC_DEVICE_127E:
> +               simatic_ipc_led_gpio_table = &simatic_ipc_led_gpio_table_127e;
> +               break;
> +       case SIMATIC_IPC_DEVICE_227G:

> +               if (!IS_ENABLED(CONFIG_GPIO_F7188X))
> +                       return -ENODEV;

Hmm... What is the difference with the 127E model in the sense of the
driver absence? Why do we need this check?

> +               request_module("gpio-f7188x");

I'm not sure why you need request_module().

> +               simatic_ipc_led_gpio_table = &simatic_ipc_led_gpio_table_227g;
> +               break;
> +       default:
> +               return -ENODEV;
> +       }

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ