Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1478323

Re: [PATCH v3 4/5] gpio: pca953x: remove an unused variable

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/5] gpio: pca953x: remove an unused variable
Date 2016-09-07 16:00 +0200
Message-ID <seLyq-ql-23@gated-at.bofh.it> (permalink)
References <seLf3-jD-17@gated-at.bofh.it> <seLf4-jD-27@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 4/5] gpio: pca953x: remove an unused variable Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-07 15:40 +0200
  Re: [PATCH v3 4/5] gpio: pca953x: remove an unused variable Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-07 16:00 +0200

csiph-web