]> git.baikalelectronics.ru Git - kernel.git/commit
media: ngene: deduplicate I2C adapter evaluation
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 25 Feb 2018 12:31:36 +0000 (07:31 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 16:13:19 +0000 (11:13 -0500)
commitfa5057bada4c79f385f62ac97b9315e6e7e52ad4
tree82a2d4903a86ee11a7364a489ea1a05389ce840d
parentb44f4b59cc8140286ee8d49f2681fbe034a30cdc
media: ngene: deduplicate I2C adapter evaluation

The I2C adapter evaluation (based on chan->number) is duplicated at
several places (tuner_attach_() functions, demod_attach_stv0900() and
cineS2_probe()). Clean this up by wrapping that construct in a separate
function which all users of that can pass the ngene_channel pointer and
get the correct I2C adapter from.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ngene/ngene-cards.c