[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1473256724.11323.72.camel@linux.intel.com>
Date: Wed, 07 Sep 2016 16:58:44 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Bartosz Golaszewski <bgolaszewski@...libre.com>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Vignesh R <vigneshr@...com>, Yong Li <yong.b.li@...el.com>,
Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linux-gpio <linux-gpio@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 4/5] gpio: pca953x: remove an unused variable
On Wed, 2016-09-07 at 15:37 +0200, Bartosz Golaszewski wrote:
> The chip_type variable in struct pca953x_chip is no longer required.
>
> Remove it.
>
> - chip->write_regs = chip->chip_type == PCA953X_TYPE ?
> - pca953x_write_regs_16 :
> - pca957x_write_regs_16;
> + if (PCA_CHIP_TYPE(chip->driver_data) == PCA953X_TYPE)
> + chip->write_regs = pca953x_write_regs_16;
> + else
> + chip->write_regs = pca957x_write_regs_16;
> chip->read_regs = pca953x_read_regs_16;
I would also move this to previous patch.
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists