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

Commit 50510993 authored by Adrian Bunk's avatar Adrian Bunk Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (7856): cx18/: possible cleanups



This patch contains the following possible cleanups:
- cx18-i2c.c should #include "cx18-i2c.h" for getting the prototypes of
  it's global functions
- make the following needlessly global functions static:
  - cx18-fileops.c:cx18_claim_stream()
  - cx18-fileops.c:cx18_release_stream()
  - cx18-queue.c:cx18_queue_move()
- remove the following unused functions:
  - cx18-driver.c:cx18_waitq()
  - cx18-queue.c:cx18_buf_copy_from_user()

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Reviewed-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 3f98387e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -164,16 +164,6 @@ MODULE_LICENSE("GPL");

MODULE_VERSION(CX18_VERSION);

int cx18_waitq(wait_queue_head_t *waitq)
{
	DEFINE_WAIT(wait);

	prepare_to_wait(waitq, &wait, TASK_INTERRUPTIBLE);
	schedule();
	finish_wait(waitq, &wait);
	return signal_pending(current) ? -EINTR : 0;
}

/* Generic utility functions */
int cx18_msleep_timeout(unsigned int msecs, int intr)
{
+0 −3
Original line number Diff line number Diff line
@@ -444,9 +444,6 @@ extern spinlock_t cx18_cards_lock;
/* Return non-zero if a signal is pending */
int cx18_msleep_timeout(unsigned int msecs, int intr);

/* Wait on queue, returns -EINTR if interrupted */
int cx18_waitq(wait_queue_head_t *waitq);

/* Read Hauppauge eeprom */
struct tveeprom; /* forward reference */
void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv);
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
   associated VBI streams are also automatically claimed.
   Possible error returns: -EBUSY if someone else has claimed
   the stream or 0 on success. */
int cx18_claim_stream(struct cx18_open_id *id, int type)
static int cx18_claim_stream(struct cx18_open_id *id, int type)
{
	struct cx18 *cx = id->cx;
	struct cx18_stream *s = &cx->streams[type];
@@ -87,7 +87,7 @@ int cx18_claim_stream(struct cx18_open_id *id, int type)

/* This function releases a previously claimed stream. It will take into
   account associated VBI streams. */
void cx18_release_stream(struct cx18_stream *s)
static void cx18_release_stream(struct cx18_stream *s)
{
	struct cx18 *cx = s->cx;
	struct cx18_stream *s_vbi;
+0 −9
Original line number Diff line number Diff line
@@ -34,12 +34,3 @@ void cx18_stop_capture(struct cx18_open_id *id, int gop_end);
void cx18_mute(struct cx18 *cx);
void cx18_unmute(struct cx18 *cx);
/* Utilities */

/* Try to claim a stream for the filehandle. Return 0 on success,
   -EBUSY if stream already claimed. Once a stream is claimed, it
   remains claimed until the associated filehandle is closed. */
int cx18_claim_stream(struct cx18_open_id *id, int type);

/* Release a previously claimed stream. */
void cx18_release_stream(struct cx18_stream *s);
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "cx18-cards.h"
#include "cx18-gpio.h"
#include "cx18-av-core.h"
#include "cx18-i2c.h"

#include <media/ir-kbd-i2c.h>

Loading