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)
commitee93340e98bc9026dedf6e7483f9f092d1765582
tree82a2d4903a86ee11a7364a489ea1a05389ce840d
parent3262831b4a9a6c0441c94a7d1c378751f462ac92
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