diff -ur kkd/ov511-2.32/ov511_core.c ov511-2.32/ov511_core.c --- kkd/ov511-2.32/ov511_core.c 2006-04-06 10:57:36.000000000 +0200 +++ ov511-2.32/ov511_core.c 2006-08-14 13:30:55.000000000 +0200 @@ -5630,7 +5630,27 @@ sensor_get_control(ov, OVCAMCHIP_CID_EXP, &x); return sprintf(buf, "%d\n", x); } -static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL); +static ssize_t set_exposure(struct class_device *cd, const char *buf, size_t count) +{ + char tbuf[11]; + struct usb_ov511 *ov = cd_to_ov(cd); + int x; + + if (!ov->dev) + return -ENODEV; + + // Maybe 10 is too much, but allows using "0x00000001" + memcpy(tbuf, buf, 10); + tbuf[10]='\0'; + if (sscanf(tbuf, "%i", &x)<=0) + return -EINVAL; + + sensor_set_control(ov, OVCAMCHIP_CID_EXP, x); + // maybe should check return value + + return count; +} +static CLASS_DEVICE_ATTR(exposure, S_IWUGO|S_IRUGO, show_exposure, set_exposure); static void ov_create_sysfs(struct video_device *vdev) {