Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59af3367 authored by Mike Isely's avatar Mike Isely Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11154): pvrusb2: Split i2c module handling from i2c adapter



This is the first step in the effort to move the pvrusb2 driver over
to using the v4l2-subdev framework.  This commit involves mainly
splitting apart pvrusb2-i2c-core - part of it is the driver's I2C
adapter driver and the rest is the old i2c module handling logic.  The
i2c module handling junk is moved out to pvrusb2-i2c-track and various
header references are correspondingly updated.  Yes, this patch has a
huge pile of checkpatch complaints, but I'm NOT going to fix any of
it.  Why?  First, I'm moving a large chunk of existing code and I'm
not going to spend time adjusting it to match someone's idea of coding
style.  Second, in the end I expect all that moved code to go away by
the time the rework is done so wasting time on it now to adhere to the
standard is in the end a large waste of time.

Signed-off-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c457377a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ obj-pvrusb2-debugifc-$(CONFIG_VIDEO_PVRUSB2_DEBUGIFC) := pvrusb2-debugifc.o
obj-pvrusb2-dvb-$(CONFIG_VIDEO_PVRUSB2_DVB) := pvrusb2-dvb.o

pvrusb2-objs	:= pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \
		   pvrusb2-i2c-track.o \
		   pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \
		   pvrusb2-encoder.o pvrusb2-video-v4l.o \
		   pvrusb2-eeprom.o pvrusb2-tuner.o \
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#ifndef __PVRUSB2_AUDIO_H
#define __PVRUSB2_AUDIO_H

#include "pvrusb2-i2c-core.h"
#include "pvrusb2-i2c-track.h"

int pvr2_i2c_msp3400_setup(struct pvr2_hdw *,struct pvr2_i2c_client *);

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@



#include "pvrusb2-i2c-core.h"
#include "pvrusb2-i2c-track.h"

int pvr2_i2c_cx2584x_v4l_setup(struct pvr2_hdw *,struct pvr2_i2c_client *);

+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include "pvrusb2-debugifc.h"
#include "pvrusb2-hdw.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-i2c-track.h"

struct debugifc_mask_item {
	const char *name;
+3 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "pvrusb2-util.h"
#include "pvrusb2-hdw.h"
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-i2c-track.h"
#include "pvrusb2-tuner.h"
#include "pvrusb2-eeprom.h"
#include "pvrusb2-hdw-internal.h"
@@ -1990,6 +1991,7 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
	}

	// This step MUST happen after the earlier powerup step.
	pvr2_i2c_track_init(hdw);
	pvr2_i2c_core_init(hdw);
	if (!pvr2_hdw_dev_ok(hdw)) return;

@@ -2501,6 +2503,7 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)
		hdw->decoder_ctrl->detach(hdw->decoder_ctrl->ctxt);
	}
	pvr2_i2c_core_done(hdw);
	pvr2_i2c_track_done(hdw);
	pvr2_hdw_remove_usb_stuff(hdw);
	mutex_lock(&pvr2_unit_mtx); do {
		if ((hdw->unit_number >= 0) &&
Loading