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:   Mon, 5 Sep 2016 16:40:25 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Vignesh R <vigneshr@...com>, Yong Li <yong.b.li@...el.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] gpio: pca953x: code shrink

On Mon, Sep 5, 2016 at 4:31 PM, Bartosz Golaszewski
<bgolaszewski@...libre.com> wrote:
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -94,6 +94,24 @@ MODULE_DEVICE_TABLE(acpi, pca953x_acpi_ids);
>
>  #define NBANK(chip) DIV_ROUND_UP(chip->gpio_chip.ngpio, BANK_SZ)
>
> +struct pca953x_offset {
> +       int direction;
> +       int output;
> +       int input;
> +};
> +
> +static struct pca953x_offset pca953x_offsets = {

const

> +       .direction = PCA953X_DIRECTION,
> +       .output = PCA953X_OUTPUT,
> +       .input = PCA953X_INPUT,
> +};
> +
> +static struct pca953x_offset pca957x_offsets = {

const

> +       .direction = PCA957X_CFG,
> +       .output = PCA957X_OUT,
> +       .input = PCA957X_IN,
> +};
> +
>  struct pca953x_chip {
>         unsigned gpio_start;
>         u8 reg_output[MAX_BANK];
> @@ -113,6 +131,8 @@ struct pca953x_chip {
>         const char *const *names;
>         int     chip_type;
>         unsigned long driver_data;
> +
> +       struct pca953x_offset *offset;

const

>  };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ