Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45522
b: refs/heads/master
c: c8fefb1
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jan 22, 2007
1 parent f8831ca commit ddff863
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 44 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd62b23cbcc691cc8faa6f4028783f60957b6508
refs/heads/master: c8fefb1bb4b38607d305c7e9ef55f146c9c628cb
4 changes: 2 additions & 2 deletions trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
{
unsigned long pfn;

/* Turn a pfn offset into an absolute pfn */
pfn = PFN_DOWN(virt_to_phys((void *)PAGE_OFFSET)) + vma->vm_pgoff;
/* Turn a kernel-virtual address into a physical page frame */
pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;

/*
* RED-PEN: on some architectures there is more mapped memory
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/cx88/cx88-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/errno.h>
#include <linux/freezer.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
Expand Down Expand Up @@ -961,6 +962,7 @@ int cx88_audio_thread(void *data)
msleep_interruptible(1000);
if (kthread_should_stop())
break;
try_to_freeze();

/* just monitor the audio status for now ... */
memset(&t, 0, sizeof(t));
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/media/video/ks0127.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ static int ks0127_command(struct i2c_client *client,
*iarg = 0;
status = ks0127_read(ks, KS_STAT);
if (!(status & 0x20)) /* NOVID not set */
*iarg = (*iarg & DECODER_STATUS_GOOD);
*iarg = (*iarg | DECODER_STATUS_GOOD);
if ((status & 0x01)) /* CLOCK set */
*iarg = (*iarg & DECODER_STATUS_COLOR);
*iarg = (*iarg | DECODER_STATUS_COLOR);
if ((status & 0x08)) /* PALDET set */
*iarg = (*iarg & DECODER_STATUS_PAL);
*iarg = (*iarg | DECODER_STATUS_PAL);
else
*iarg = (*iarg & DECODER_STATUS_NTSC);
*iarg = (*iarg | DECODER_STATUS_NTSC);
break;

//Catch any unknown command
Expand Down
14 changes: 10 additions & 4 deletions trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 1 << 21,
.inputs = {{
.name = name_tv,
.vmux = 1,
Expand All @@ -2578,15 +2579,20 @@ struct saa7134_board saa7134_boards[] = {
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.amux = LINE2, /* unconfirmed, taken from Philips driver */
},{
.name = name_comp2,
.vmux = 0, /* untested, Composite over S-Video */
.amux = LINE2,
},{
.name = name_svideo,
.vmux = 0,
.amux = LINE1,
.vmux = 8,
.amux = LINE2,
}},
.radio = {
.name = name_radio,
.amux = LINE1,
.amux = TV,
.gpio = 0x0200000,
},
},
[SAA7134_BOARD_CINERGY250PCI] = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tveeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ hauppauge_tuner[] =
{ TUNER_ABSENT, "Thompson DTT757"},
/* 80-89 */
{ TUNER_ABSENT, "Philips FQ1216LME MK3"},
{ TUNER_ABSENT, "LG TAPC G701D"},
{ TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"},
{ TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"},
{ TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
{ TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"},
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/media/video/usbvideo/quickcam_messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,13 @@ struct rgb {
};

struct bayL0 {
#ifdef __BIG_ENDIAN
u8 r;
u8 g;
#elif __LITTLE_ENDIAN
u8 g;
u8 r;
#else
#error not byte order defined
#endif
};

struct bayL1 {
#ifdef __BIG_ENDIAN
u8 g;
u8 b;
#elif __LITTLE_ENDIAN
u8 b;
u8 g;
#else
#error not byte order defined
#endif
};

struct cam_size {
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/usbvision/usbvision-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
int noblock = file->f_flags & O_NONBLOCK;
unsigned long lock_flags;

int frmx = -1;
int ret,i;
struct usbvision_frame *frame;

Expand Down Expand Up @@ -1155,7 +1154,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
frame->bytes_read = 0;

/* Mark it as available to be used again. */
usbvision->frame[frmx].grabstate = FrameState_Unused;
frame->grabstate = FrameState_Unused;
/* } */

return count;
Expand Down
9 changes: 8 additions & 1 deletion trunk/drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,15 @@ MODULE_LICENSE("GPL");
char *v4l2_norm_to_name(v4l2_std_id id)
{
char *name;
u32 myid = id;

switch (id) {
/* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle
64 bit comparations. So, on that architecture, with some gcc variants,
compilation fails. Currently, the max value is 30bit wide.
*/
BUG_ON(myid != id);

switch (myid) {
case V4L2_STD_PAL:
name="PAL"; break;
case V4L2_STD_PAL_BG:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/video-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
vaddr,vma->vm_start,vma->vm_end);
if (vaddr > vma->vm_end)
return NOPAGE_SIGBUS;
page = alloc_page(GFP_USER);
page = alloc_page(GFP_USER | __GFP_DMA32);
if (!page)
return NOPAGE_OOM;
clear_user_page(page_address(page), vaddr, page);
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,15 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
char *p,*s,*basep;
struct page *pg;
u8 chr,r,g,b,color;
unsigned long flags;
spinlock_t spinlock;

spin_lock_init(&spinlock);

/* Get first addr pointed to pixel position */
oldpg=get_addr_pos(pos,pages,to_addr);
pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
spin_lock_irqsave(&spinlock,flags);
basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;

/* We will just duplicate the second pixel at the packet */
Expand Down Expand Up @@ -376,6 +381,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,

end:
kunmap_atomic(basep, KM_BOUNCE_READ);
spin_unlock_irqrestore(&spinlock,flags);

}
static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
{
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/mmc/imxmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd,
case MMC_RSP_R3: /* short */
cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3;
break;
case MMC_RSP_R6: /* short CRC */
cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R6;
break;
default:
break;
}
Expand Down
15 changes: 9 additions & 6 deletions trunk/drivers/mmc/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@


#define DRIVER_NAME "mmci-omap"
#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))

/* Specifies how often in millisecs to poll for card status changes
* when the cover switch is open */
Expand Down Expand Up @@ -204,18 +203,22 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
cmdtype = 0;

/* Our hardware needs to know exact type */
switch (RSP_TYPE(mmc_resp_type(cmd))) {
case RSP_TYPE(MMC_RSP_R1):
/* resp 1, resp 1b */
switch (mmc_resp_type(cmd)) {
case MMC_RSP_NONE:
break;
case MMC_RSP_R1:
case MMC_RSP_R1B:
/* resp 1, 1b, 6, 7 */
resptype = 1;
break;
case RSP_TYPE(MMC_RSP_R2):
case MMC_RSP_R2:
resptype = 2;
break;
case RSP_TYPE(MMC_RSP_R3):
case MMC_RSP_R3:
resptype = 3;
break;
default:
dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
break;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd,

#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
switch (RSP_TYPE(mmc_resp_type(cmd))) {
case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6 */
case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6, r7 */
cmdat |= CMDAT_RESP_SHORT;
break;
case RSP_TYPE(MMC_RSP_R3):
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/mmc/tifm_sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ static unsigned int tifm_sd_op_flags(struct mmc_command *cmd)
case MMC_RSP_R3:
rc |= TIFM_MMCSD_RSP_R3;
break;
case MMC_RSP_R6:
rc |= TIFM_MMCSD_RSP_R6;
break;
default:
BUG();
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mmc/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct mmc_command {
#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
#define MMC_RSP_R3 (MMC_RSP_PRESENT)
#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC)
#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)

#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))

Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/videodev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,15 @@ typedef __u64 v4l2_std_id;
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)

/* FIXME:
Although std_id is 64 bits, there is an issue on PPC32 architecture that
makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
this value to 32 bits.
As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide),
it should work fine. However, if needed to add more than two standards,
v4l2-common.c should be fixed.
*/

/* some merged standards */
#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
Expand Down

0 comments on commit ddff863

Please sign in to comment.