Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 16:48:49 +0000 (09:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 16:48:49 +0000 (09:48 -0700)
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] futex: let futex_atomic_cmpxchg_pt survive early functional tests.

17 files changed:
drivers/media/dvb/dvb-usb/opera1.c
drivers/media/video/Kconfig
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/ivtv/ivtv-driver.c
drivers/media/video/ivtv/ivtv-firmware.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/tvp5150.c
drivers/media/video/usbvideo/usbvideo.c
drivers/media/video/v4l1-compat.c
include/linux/security.h
security/capability.c
security/commoncap.c
security/smack/smack_lsm.c

index 21935bf..302cc67 100644 (file)
@@ -478,9 +478,9 @@ static int opera1_xilinx_load_firmware(struct usb_device *dev,
                                err("could not restart the USB controller CPU.");
                                ret = -EINVAL;
                        }
-                       kfree(p);
                }
        }
+       kfree(p);
        if (fw) {
                release_firmware(fw);
        }
index 37072a2..1832966 100644 (file)
@@ -305,7 +305,7 @@ comment "MPEG video encoders"
 
 config VIDEO_CX2341X
        tristate "Conexant CX2341x MPEG encoders"
-       depends on VIDEO_V4L2 && EXPERIMENTAL
+       depends on VIDEO_V4L2 && EXPERIMENTAL && VIDEO_V4L2_COMMON
        ---help---
          Support for the Conexant CX23416 MPEG encoders
          and CX23415 MPEG encoder/decoders.
@@ -382,7 +382,7 @@ endmenu # encoder / decoder chips
 
 config VIDEO_VIVI
        tristate "Virtual Video Driver"
-       depends on VIDEO_V4L2 && !SPARC32 && !SPARC64
+       depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64
        select VIDEOBUF_VMALLOC
        default n
        ---help---
index 5404fcc..a080c14 100644 (file)
@@ -3388,7 +3388,6 @@ static struct video_device bttv_video_template =
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
        .vidiocgmbuf                    = vidiocgmbuf,
 #endif
-       .vidioc_g_crop                  = bttv_g_crop,
        .vidioc_g_crop                  = bttv_g_crop,
        .vidioc_s_crop                  = bttv_s_crop,
        .vidioc_g_fbuf                  = bttv_g_fbuf,
index e6b7f51..8c9a8ad 100644 (file)
@@ -2196,6 +2196,11 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
        cx88_reset(core);
        cx88_card_setup_pre_i2c(core);
        cx88_i2c_init(core, pci);
+
+       /* load tuner module, if needed */
+       if (TUNER_ABSENT != core->board.tuner_type)
+               request_module("tuner");
+
        cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
        cx88_card_setup(core);
        cx88_ir_init(core, pci);
index 7f1931a..2271796 100644 (file)
@@ -1826,8 +1826,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
        cx_set(MO_PCI_INTMSK, core->pci_irqmask);
 
        /* load and configure helper modules */
-       if (TUNER_ABSENT != core->board.tuner_type)
-               request_module("tuner");
 
        if (core->board.audio_chip == AUDIO_CHIP_WM8775)
                request_module("wm8775");
index 7d1537c..c1caaa8 100644 (file)
@@ -267,7 +267,7 @@ static int em28xx_write_ac97(struct em28xx *dev, u8 reg, u8 *val)
        for (i = 0; i < 10; i++) {
                if ((ret = em28xx_read_reg(dev, AC97BUSY_REG)) < 0)
                        return ret;
-               if (!((u8) ret) & 0x01)
+               if (!(ret & 0x01))
                        return 0;
                msleep(5);
        }
index d42f120..948ca35 100644 (file)
@@ -54,7 +54,6 @@
 #include "ivtv-vbi.h"
 #include "ivtv-routing.h"
 #include "ivtv-gpio.h"
-#include "ivtv-yuv.h"
 
 #include <media/tveeprom.h>
 #include <media/saa7115.h>
@@ -700,6 +699,9 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv)
        itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
        itv->vbi.sliced_in = &itv->vbi.in.fmt.sliced;
 
+       /* Init the sg table for osd/yuv output */
+       sg_init_table(itv->udma.SGlist, IVTV_DMA_SG_OSD_ENT);
+
        /* OSD */
        itv->osd_global_alpha_state = 1;
        itv->osd_global_alpha = 255;
@@ -1053,9 +1055,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
                goto free_io;
        }
 
-       /* Check yuv output filter table */
-       if (itv->has_cx23415) ivtv_yuv_filter_check(itv);
-
        ivtv_gpio_init(itv);
 
        /* active i2c  */
index 425eb10..6dba55b 100644 (file)
@@ -22,6 +22,7 @@
 #include "ivtv-driver.h"
 #include "ivtv-mailbox.h"
 #include "ivtv-firmware.h"
+#include "ivtv-yuv.h"
 #include <linux/firmware.h>
 
 #define IVTV_MASK_SPU_ENABLE           0xFFFFFFFE
@@ -225,11 +226,14 @@ int ivtv_firmware_init(struct ivtv *itv)
                return 0;
 
        itv->dec_mbox.mbox = ivtv_search_mailbox(itv->dec_mem, IVTV_DECODER_SIZE);
-       if (itv->dec_mbox.mbox == NULL)
+       if (itv->dec_mbox.mbox == NULL) {
                IVTV_ERR("Decoder mailbox not found\n");
-       else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) {
+       else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) {
                IVTV_ERR("Decoder firmware dead!\n");
                itv->dec_mbox.mbox = NULL;
+       } else {
+               /* Firmware okay, so check yuv output filter table */
+               ivtv_yuv_filter_check(itv);
        }
        return itv->dec_mbox.mbox ? 0 : -ENODEV;
 }
index 262830d..6f57442 100644 (file)
@@ -2484,27 +2484,28 @@ struct saa7134_board saa7134_boards[] = {
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .gpiomask       = 0x080200000,
-               .inputs         = {{
-                         .name = name_tv,
-                         .vmux = 4,
-                         .amux = TV,
-                         .tv   = 1,
-               },{
-                         .name = name_comp1,
-                         .vmux = 1,
-                        .amux = LINE2,
-              },{
-                        .name = name_comp2,
-                        .vmux = 0,
-                         .amux = LINE2,
-               },{
-                         .name = name_svideo,
-                         .vmux = 8,
-                         .amux = LINE2,
-               }},
+               .inputs         = { {
+                       .name = name_tv,
+                       .vmux = 4,
+                       .amux = TV,
+                       .tv   = 1,
+               }, {
+                       .name = name_comp1,
+                       .vmux = 1,
+                       .amux = LINE2,
+               }, {
+                       .name = name_comp2,
+                       .vmux = 0,
+                       .amux = LINE2,
+               }, {
+                       .name = name_svideo,
+                       .vmux = 8,
+                       .amux = LINE2,
+               } },
                .radio = {
-                         .name = name_radio,
-                         .amux = LINE1,
+                       .name = name_radio,
+                       .amux = TV,
+                       .gpio = 0x0200000,
                },
        },
        [SAA7134_BOARD_ASUSTeK_P7131_DUAL] = {
index 52baa4f..58ab163 100644 (file)
@@ -1022,12 +1022,13 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        saa7134_i2c_register(dev);
 
        /* initialize hardware #2 */
+       if (TUNER_ABSENT != dev->tuner_type)
+               request_module("tuner");
        saa7134_board_init2(dev);
+
        saa7134_hwinit2(dev);
 
        /* load i2c helpers */
-       if (TUNER_ABSENT != dev->tuner_type)
-               request_module("tuner");
        if (card_is_empress(dev)) {
                request_module("saa6752hs");
        }
index 445eba4..d28318c 100644 (file)
@@ -672,7 +672,7 @@ static int tvp5150_set_vbi(struct i2c_client *c,
        if (std == V4L2_STD_ALL) {
                tvp5150_err("VBI can't be configured without knowing number of lines\n");
                return 0;
-       } else if (std && V4L2_STD_625_50) {
+       } else if (std & V4L2_STD_625_50) {
                /* Don't follow NTSC Line number convension */
                line += 3;
        }
@@ -719,7 +719,7 @@ static int tvp5150_get_vbi(struct i2c_client *c,
        if (std == V4L2_STD_ALL) {
                tvp5150_err("VBI can't be configured without knowing number of lines\n");
                return 0;
-       } else if (std && V4L2_STD_625_50) {
+       } else if (std & V4L2_STD_625_50) {
                /* Don't follow NTSC Line number convension */
                line += 3;
        }
index fb434b5..5d363be 100644 (file)
@@ -1034,6 +1034,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
                info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx",
                     __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits);
        }
+       if (uvd->dev == NULL) {
+               err("%s: uvd->dev == NULL", __FUNCTION__);
+               return -EINVAL;
+       }
+       uvd->vdev.dev=&(uvd->dev->dev);
        if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
                err("%s: video_register_device failed", __FUNCTION__);
                return -EPIPE;
@@ -1041,10 +1046,6 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
        if (uvd->debug > 1) {
                info("%s: video_register_device() successful", __FUNCTION__);
        }
-       if (uvd->dev == NULL) {
-               err("%s: uvd->dev == NULL", __FUNCTION__);
-               return -EINVAL;
-       }
 
        info("%s on /dev/video%d: canvas=%s videosize=%s",
             (uvd->handle != NULL) ? uvd->handle->drvName : "???",
index dcf22a3..50e1ff9 100644 (file)
@@ -303,7 +303,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
        {
                struct video_capability *cap = arg;
 
-               cap2 = kzalloc(sizeof(*cap2),GFP_KERNEL);
+               cap2 = kzalloc(sizeof(*cap2), GFP_KERNEL);
+               if (!cap2) {
+                       err = -ENOMEM;
+                       break;
+               }
                memset(cap, 0, sizeof(*cap));
                memset(&fbuf2, 0, sizeof(fbuf2));
 
@@ -426,7 +430,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
        {
                struct video_window     *win = arg;
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                memset(win,0,sizeof(*win));
 
                fmt2->type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
@@ -464,7 +472,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                struct video_window     *win = arg;
                int err1,err2;
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
                drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type);
                err1 = drv(inode, file, VIDIOC_G_FMT, fmt2);
@@ -586,6 +598,12 @@ v4l_compat_translate_ioctl(struct inode         *inode,
        {
                struct video_picture    *pict = arg;
 
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
+
                pict->brightness = get_v4l_control(inode, file,
                                                   V4L2_CID_BRIGHTNESS,drv);
                pict->hue = get_v4l_control(inode, file,
@@ -597,7 +615,6 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                pict->whiteness = get_v4l_control(inode, file,
                                                  V4L2_CID_WHITENESS, drv);
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
                fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
                err = drv(inode, file, VIDIOC_G_FMT, fmt2);
                if (err < 0) {
@@ -617,6 +634,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                struct video_picture    *pict = arg;
                int mem_err = 0, ovl_err = 0;
 
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                memset(&fbuf2, 0, sizeof(fbuf2));
 
                set_v4l_control(inode, file,
@@ -636,7 +658,6 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                 * different pixel formats for memory vs overlay.
                 */
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
                fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
                err = drv(inode, file, VIDIOC_G_FMT, fmt2);
                /* If VIDIOC_G_FMT failed, then the driver likely doesn't
@@ -890,7 +911,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
        {
                struct video_mmap       *mm = arg;
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                memset(&buf2,0,sizeof(buf2));
 
                fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -986,7 +1011,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
        {
                struct vbi_format      *fmt = arg;
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
 
                err = drv(inode, file, VIDIOC_G_FMT, fmt2);
@@ -1018,8 +1047,11 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                        break;
                }
 
-               fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
-
+               fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
+               if (!fmt2) {
+                       err = -ENOMEM;
+                       break;
+               }
                fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
                fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line;
                fmt2->fmt.vbi.sampling_rate    = fmt->sampling_rate;
index b07357c..c673dfd 100644 (file)
@@ -57,7 +57,6 @@ extern int cap_inode_need_killpriv(struct dentry *dentry);
 extern int cap_inode_killpriv(struct dentry *dentry);
 extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
 extern void cap_task_reparent_to_init (struct task_struct *p);
-extern int cap_task_kill(struct task_struct *p, struct siginfo *info, int sig, u32 secid);
 extern int cap_task_setscheduler (struct task_struct *p, int policy, struct sched_param *lp);
 extern int cap_task_setioprio (struct task_struct *p, int ioprio);
 extern int cap_task_setnice (struct task_struct *p, int nice);
@@ -2187,7 +2186,7 @@ static inline int security_task_kill (struct task_struct *p,
                                      struct siginfo *info, int sig,
                                      u32 secid)
 {
-       return cap_task_kill(p, info, sig, secid);
+       return 0;
 }
 
 static inline int security_task_wait (struct task_struct *p)
index 9e99f36..2c6e06d 100644 (file)
@@ -40,7 +40,6 @@ static struct security_operations capability_ops = {
        .inode_need_killpriv =          cap_inode_need_killpriv,
        .inode_killpriv =               cap_inode_killpriv,
 
-       .task_kill =                    cap_task_kill,
        .task_setscheduler =            cap_task_setscheduler,
        .task_setioprio =               cap_task_setioprio,
        .task_setnice =                 cap_task_setnice,
index bb0c095..06d5c94 100644 (file)
@@ -540,41 +540,6 @@ int cap_task_setnice (struct task_struct *p, int nice)
        return cap_safe_nice(p);
 }
 
-int cap_task_kill(struct task_struct *p, struct siginfo *info,
-                               int sig, u32 secid)
-{
-       if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info)))
-               return 0;
-
-       /*
-        * Running a setuid root program raises your capabilities.
-        * Killing your own setuid root processes was previously
-        * allowed.
-        * We must preserve legacy signal behavior in this case.
-        */
-       if (p->uid == current->uid)
-               return 0;
-
-       /* sigcont is permitted within same session */
-       if (sig == SIGCONT && (task_session_nr(current) == task_session_nr(p)))
-               return 0;
-
-       if (secid)
-               /*
-                * Signal sent as a particular user.
-                * Capabilities are ignored.  May be wrong, but it's the
-                * only thing we can do at the moment.
-                * Used only by usb drivers?
-                */
-               return 0;
-       if (cap_issubset(p->cap_permitted, current->cap_permitted))
-               return 0;
-       if (capable(CAP_KILL))
-               return 0;
-
-       return -EPERM;
-}
-
 /*
  * called from kernel/sys.c for prctl(PR_CABSET_DROP)
  * done without task_capability_lock() because it introduces
@@ -605,11 +570,6 @@ int cap_task_setnice (struct task_struct *p, int nice)
 {
        return 0;
 }
-int cap_task_kill(struct task_struct *p, struct siginfo *info,
-                               int sig, u32 secid)
-{
-       return 0;
-}
 #endif
 
 void cap_task_reparent_to_init (struct task_struct *p)
index 38d7075..732ba27 100644 (file)
@@ -1117,11 +1117,6 @@ static int smack_task_movememory(struct task_struct *p)
 static int smack_task_kill(struct task_struct *p, struct siginfo *info,
                           int sig, u32 secid)
 {
-       int rc;
-
-       rc = cap_task_kill(p, info, sig, secid);
-       if (rc != 0)
-               return rc;
        /*
         * Special cases where signals really ought to go through
         * in spite of policy. Stephen Smalley suggests it may