Skip to content

Commit

Permalink
V4L/DVB (11154): pvrusb2: Split i2c module handling from i2c adapter
Browse files Browse the repository at this point in the history
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: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent c457377 commit 59af336
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 476 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/pvrusb2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-debugifc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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) &&
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#include <linux/kernel.h>
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-i2c-track.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-i2c-cmd-v4l2.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef __PVRUSB2_CMD_V4L2_H
#define __PVRUSB2_CMD_V4L2_H

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

extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_init;
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard;
Expand Down
Loading

0 comments on commit 59af336

Please sign in to comment.