lkml.org 
[lkml]   [2016]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 4/5] gpio: pca953x: remove an unused variable
From
Date
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@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.191 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site