From: Domen Puncer <domen@coderock.org>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [patch 2.6.2] some stv680 fixes
Date: Sun, 15 Feb 2004 19:06:14 +0000 [thread overview]
Message-ID: <200402152006.15059.domen@coderock.org> (raw)
Hi.
- swapRGB is already initialized to 0
- change "swapRGB_on = 1" to match in-source documentation
- submit urb with GFP_ATOMIC (interrupt context) - this made driver
unusable because of "might_sleep" messages.
- group some "case"s
- release vdev on fail
- remove "kfree(0)" checking
Compiles, works.
Domen
--- c/drivers/usb/media/stv680.c 2004-02-04 04:44:04.000000000 +0100
+++ a/drivers/usb/media/stv680.c 2004-02-15 16:55:26.000000000 +0100
@@ -490,10 +490,9 @@ exit:
stv680->hue = 32767;
stv680->palette = STV_VIDEO_PALETTE;
stv680->depth = 24; /* rgb24 bits */
- swapRGB = 0;
if ((swapRGB_on = 0) && (swapRGB = 0))
PDEBUG (1, "STV(i): swapRGB is (auto) OFF");
- else if ((swapRGB_on = 1) && (swapRGB = 1))
+ else if ((swapRGB_on = 0) && (swapRGB = 1))
PDEBUG (1, "STV(i): swapRGB is (auto) ON");
else if (swapRGB_on = 1)
PDEBUG (1, "STV(i): swapRGB is (forced) ON");
@@ -657,7 +656,7 @@ static void stv680_video_irq (struct urb
/* Resubmit urb for new data */
urb->status = 0;
urb->dev = stv680->udev;
- if (usb_submit_urb (urb, GFP_KERNEL))
+ if (usb_submit_urb (urb, GFP_ATOMIC))
PDEBUG (0, "STV(e): urb burned down in video irq");
return;
} /* _video_irq */
@@ -1252,13 +1251,10 @@ static int stv680_do_ioctl (struct inode
return -EINVAL;
}
case VIDIOCSFBUF:
- return -EINVAL;
case VIDIOCGTUNER:
case VIDIOCSTUNER:
- return -EINVAL;
case VIDIOCGFREQ:
case VIDIOCSFREQ:
- return -EINVAL;
case VIDIOCGAUDIO:
case VIDIOCSAUDIO:
return -EINVAL;
@@ -1434,7 +1430,7 @@ static int stv680_probe (struct usb_inte
if (video_register_device (stv680->vdev, VFL_TYPE_GRABBER, video_nr) = -1) {
PDEBUG (0, "STV(e): video_register_device failed");
retval = -EIO;
- goto error;
+ goto error_vdev;
}
PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev->minor);
@@ -1442,6 +1438,8 @@ static int stv680_probe (struct usb_inte
stv680_create_sysfs_files(stv680->vdev);
return 0;
+error_vdev:
+ video_device_release(stv680->vdev);
error:
kfree(stv680);
return retval;
@@ -1466,9 +1464,7 @@ static inline void usb_stv680_remove_dis
kfree (stv680->sbuf[i].data);
}
for (i = 0; i < STV680_NUMSCRATCH; i++)
- if (stv680->scratch[i].data) {
- kfree (stv680->scratch[i].data);
- }
+ kfree (stv680->scratch[i].data);
PDEBUG (0, "STV(i): %s disconnected", stv680->camera_name);
/* Free the memory */
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next reply other threads:[~2004-02-15 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-15 19:06 Domen Puncer [this message]
2004-02-18 0:10 ` [Kernel-janitors] [patch 2.6.2] some stv680 fixes Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200402152006.15059.domen@coderock.org \
--to=domen@coderock.org \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.