git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
V4L/DVB (8703): gspca: Do controls work for spca561 revision 12a.
[safe/jmp/linux-2.6]
/
drivers
/
media
/
video
/
saa5246a.c
diff --git
a/drivers/media/video/saa5246a.c
b/drivers/media/video/saa5246a.c
index
dd830e0
..
6ee63e6
100644
(file)
--- a/
drivers/media/video/saa5246a.c
+++ b/
drivers/media/video/saa5246a.c
@@
-40,12
+40,13
@@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/videotext.h>
#include <linux/videodev.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/videotext.h>
#include <linux/videodev.h>
+#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
#include <linux/mutex.h>
#include "saa5246a.h"
#include <linux/mutex.h>
#include "saa5246a.h"
@@
-66,6
+67,7
@@
static struct video_device saa_template; /* Declared near bottom */
/* Addresses to scan */
static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END };
/* Addresses to scan */
static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END };
+
I2C_CLIENT_INSMOD;
static struct i2c_client client_template;
I2C_CLIENT_INSMOD;
static struct i2c_client client_template;
@@
-111,7
+113,7
@@
static int saa5246a_attach(struct i2c_adapter *adap, int addr, int kind)
for (pgbuf = 0; pgbuf < NUM_DAUS; pgbuf++)
{
memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0]));
for (pgbuf = 0; pgbuf < NUM_DAUS; pgbuf++)
{
memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0]));
- t->is_searching[pgbuf] =
FALSE
;
+ t->is_searching[pgbuf] =
false
;
}
vd->priv=t;
}
vd->priv=t;
@@
-187,19
+189,21
@@
static int i2c_senddata(struct saa5246a_device *t, ...)
{
unsigned char buf[64];
int v;
{
unsigned char buf[64];
int v;
- int ct
=
0;
+ int ct
=
0;
va_list argp;
va_list argp;
- va_start(argp,t);
+ va_start(argp, t);
+
+ while ((v = va_arg(argp, int)) != -1)
+ buf[ct++] = v;
- while((v=va_arg(argp,int))!=-1)
- buf[ct++]=v;
+ va_end(argp);
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}
-/* Get count number of bytes from I²C-device at address adr, store them in buf.
+/* Get count number of bytes from I
Â
²C-device at address adr, store them in buf.
* Start & stop handshaking is done by this routine, ack will be sent after the
* Start & stop handshaking is done by this routine, ack will be sent after the
- * last byte to inhibit further sending of data. If uaccess is
TRUE
, data is
- * written to user-space with put_user. Returns -1 if I²C-device didn't send
+ * last byte to inhibit further sending of data. If uaccess is
'true'
, data is
+ * written to user-space with put_user. Returns -1 if I
Â
²C-device didn't send
* acknowledge, 0 otherwise
*/
static int i2c_getdata(struct saa5246a_device *t, int count, u8 *buf)
* acknowledge, 0 otherwise
*/
static int i2c_getdata(struct saa5246a_device *t, int count, u8 *buf)
@@
-338,7
+342,7
@@
static int saa5246a_request_page(struct saa5246a_device *t,
return -EIO;
}
return -EIO;
}
- t->is_searching[req->pgbuf] =
TRUE
;
+ t->is_searching[req->pgbuf] =
true
;
return 0;
}
return 0;
}
@@
-452,7
+456,7
@@
static inline int saa5246a_get_status(struct saa5246a_device *t,
}
}
if (!info->hamming && !info->notfound)
}
}
if (!info->hamming && !info->notfound)
- t->is_searching[dau_no] =
FALSE
;
+ t->is_searching[dau_no] =
false
;
return 0;
}
return 0;
}
@@
-564,7
+568,7
@@
static inline int saa5246a_stop_dau(struct saa5246a_device *t,
{
return -EIO;
}
{
return -EIO;
}
- t->is_searching[dau_no] =
FALSE
;
+ t->is_searching[dau_no] =
false
;
return 0;
}
return 0;
}
@@
-816,7
+820,7
@@
static void __exit cleanup_saa_5246a (void)
module_init(init_saa_5246a);
module_exit(cleanup_saa_5246a);
module_init(init_saa_5246a);
module_exit(cleanup_saa_5246a);
-static struct file_operations saa_fops = {
+static
const
struct file_operations saa_fops = {
.owner = THIS_MODULE,
.open = saa5246a_open,
.release = saa5246a_release,
.owner = THIS_MODULE,
.open = saa5246a_open,
.release = saa5246a_release,
@@
-826,10
+830,7
@@
static struct file_operations saa_fops = {
static struct video_device saa_template =
{
static struct video_device saa_template =
{
- .owner = THIS_MODULE,
.name = IF_NAME,
.name = IF_NAME,
- .type = VID_TYPE_TELETEXT,
- .hardware = VID_HARDWARE_SAA5249,
.fops = &saa_fops,
.release = video_device_release,
.minor = -1,
.fops = &saa_fops,
.release = video_device_release,
.minor = -1,