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
/
tda9840.c
diff --git
a/drivers/media/video/tda9840.c
b/drivers/media/video/tda9840.c
index
ed4c041
..
2437c1a
100644
(file)
--- a/
drivers/media/video/tda9840.c
+++ b/
drivers/media/video/tda9840.c
@@
-24,17
+24,19
@@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
#include "tda9840.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
#include "tda9840.h"
-static int debug
= 0;
/* insmod parameter */
+static int debug
;
/* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
+
#define dprintk(args...) \
#define dprintk(args...) \
-
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION
__, __LINE__); printk(args); } } while (0)
+
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func
__, __LINE__); printk(args); } } while (0)
#define SWITCH 0x00
#define LEVEL_ADJUST 0x02
#define SWITCH 0x00
#define LEVEL_ADJUST 0x02
@@
-42,7
+44,7
@@
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define TEST 0x04
/* addresses to scan, found only at 0x42 (7-Bit) */
#define TEST 0x04
/* addresses to scan, found only at 0x42 (7-Bit) */
-static unsigned short normal_i2c[] = { I2C_TDA9840, I2C_CLIENT_END };
+static unsigned short normal_i2c[] = { I2C_
ADDR_
TDA9840, I2C_CLIENT_END };
/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
@@
-171,7
+173,7
@@
static int detect(struct i2c_adapter *adapter, int address, int kind)
/* allocate memory for client structure */
client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
/* allocate memory for client structure */
client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
- if (
0 ==
client) {
+ if (
!
client) {
printk("not enough kernel memory\n");
return -ENOMEM;
}
printk("not enough kernel memory\n");
return -ENOMEM;
}
@@
-222,7
+224,7
@@
static int detach(struct i2c_client *client)
static struct i2c_driver driver = {
.driver = {
static struct i2c_driver driver = {
.driver = {
- .name
= "tda9840",
+ .name = "tda9840",
},
.id = I2C_DRIVERID_TDA9840,
.attach_adapter = attach,
},
.id = I2C_DRIVERID_TDA9840,
.attach_adapter = attach,