summaryrefslogtreecommitdiffstats
path: root/sys/dev/bktr
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1997-11-06 20:06:19 +0000
committermarkm <markm@FreeBSD.org>1997-11-06 20:06:19 +0000
commit45a9d49a7f4c4a1503a3b55aae2ebdf2a83382ec (patch)
tree26b5adf3b417c78c9503138ab5b6e885b3a9653c /sys/dev/bktr
parent4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (diff)
downloadFreeBSD-src-45a9d49a7f4c4a1503a3b55aae2ebdf2a83382ec.zip
FreeBSD-src-45a9d49a7f4c4a1503a3b55aae2ebdf2a83382ec.tar.gz
Rats. Committed the wrong version.
Move the declarations to the top of the ioctl() function so this compiles.
Diffstat (limited to 'sys/dev/bktr')
-rw-r--r--sys/dev/bktr/bktr_core.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c
index c14fe10..b7025ba 100644
--- a/sys/dev/bktr/bktr_core.c
+++ b/sys/dev/bktr/bktr_core.c
@@ -1414,6 +1414,12 @@ video_ioctl( bktr_ptr_t bktr, int unit, int cmd, caddr_t arg, struct proc* pr )
vm_offset_t buf;
struct format_params *fp;
int i;
+ u_long par;
+ u_char write;
+ int i2c_addr;
+ int i2c_port;
+ u_long data;
+
bt848 = bktr->base;
switch ( cmd ) {
@@ -1952,11 +1958,11 @@ video_ioctl( bktr_ptr_t bktr, int unit, int cmd, caddr_t arg, struct proc* pr )
/* end of METEORSETGEO */
case BT848_I2CWR:
- u_long par = *(u_long *)arg;
- u_char write = (par >> 24) & 0xff ;
- int i2c_addr = (par >> 16) & 0xff ;
- int i2c_port = (par >> 8) & 0xff ;
- u_long data = (par) & 0xff ;
+ par = *(u_long *)arg;
+ write = (par >> 24) & 0xff ;
+ i2c_addr = (par >> 16) & 0xff ;
+ i2c_port = (par >> 8) & 0xff ;
+ data = (par) & 0xff ;
if (write) {
i2cWrite( bktr, i2c_addr, i2c_port, data);
OpenPOWER on IntegriCloud