Commit bee8a44e authored by Ralf Baechle's avatar Ralf Baechle Committed by Mauro Carvalho Chehab

V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS

Both use __SC.  Since __* is sort of private namespace I've choosen to fix
this in the driver.  For consistency I decieded to also change __UNSC to
UNSC.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 6ccd6017
...@@ -1827,8 +1827,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win) ...@@ -1827,8 +1827,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
int err = 0; int err = 0;
/* Work around to avoid FP arithmetics */ /* Work around to avoid FP arithmetics */
#define __SC(x) ((x) << 10) #define SC(x) ((x) << 10)
#define __UNSC(x) ((x) >> 10) #define UNSC(x) ((x) >> 10)
/* Make sure we are using a supported resolution */ /* Make sure we are using a supported resolution */
if ((err = w9968cf_adjust_window_size(cam, (u16*)&win.width, if ((err = w9968cf_adjust_window_size(cam, (u16*)&win.width,
...@@ -1836,15 +1836,15 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win) ...@@ -1836,15 +1836,15 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
goto error; goto error;
/* Scaling factors */ /* Scaling factors */
fw = __SC(win.width) / cam->maxwidth; fw = SC(win.width) / cam->maxwidth;
fh = __SC(win.height) / cam->maxheight; fh = SC(win.height) / cam->maxheight;
/* Set up the width and height values used by the chip */ /* Set up the width and height values used by the chip */
if ((win.width > cam->maxwidth) || (win.height > cam->maxheight)) { if ((win.width > cam->maxwidth) || (win.height > cam->maxheight)) {
cam->vpp_flag |= VPP_UPSCALE; cam->vpp_flag |= VPP_UPSCALE;
/* Calculate largest w,h mantaining the same w/h ratio */ /* Calculate largest w,h mantaining the same w/h ratio */
w = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh; w = (fw >= fh) ? cam->maxwidth : SC(win.width)/fh;
h = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight; h = (fw >= fh) ? SC(win.height)/fw : cam->maxheight;
if (w < cam->minwidth) /* just in case */ if (w < cam->minwidth) /* just in case */
w = cam->minwidth; w = cam->minwidth;
if (h < cam->minheight) /* just in case */ if (h < cam->minheight) /* just in case */
...@@ -1861,8 +1861,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win) ...@@ -1861,8 +1861,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
/* Calculate cropped area manteining the right w/h ratio */ /* Calculate cropped area manteining the right w/h ratio */
if (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) { if (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) {
cw = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh; cw = (fw >= fh) ? cam->maxwidth : SC(win.width)/fh;
ch = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight; ch = (fw >= fh) ? SC(win.height)/fw : cam->maxheight;
} else { } else {
cw = w; cw = w;
ch = h; ch = h;
...@@ -1901,8 +1901,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win) ...@@ -1901,8 +1901,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
/* We have to scale win.x and win.y offsets */ /* We have to scale win.x and win.y offsets */
if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
|| (cam->vpp_flag & VPP_UPSCALE) ) { || (cam->vpp_flag & VPP_UPSCALE) ) {
ax = __SC(win.x)/fw; ax = SC(win.x)/fw;
ay = __SC(win.y)/fh; ay = SC(win.y)/fh;
} else { } else {
ax = win.x; ax = win.x;
ay = win.y; ay = win.y;
...@@ -1917,8 +1917,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win) ...@@ -1917,8 +1917,8 @@ w9968cf_set_window(struct w9968cf_device* cam, struct video_window win)
/* Adjust win.x, win.y */ /* Adjust win.x, win.y */
if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
|| (cam->vpp_flag & VPP_UPSCALE) ) { || (cam->vpp_flag & VPP_UPSCALE) ) {
win.x = __UNSC(ax*fw); win.x = UNSC(ax*fw);
win.y = __UNSC(ay*fh); win.y = UNSC(ay*fh);
} else { } else {
win.x = ax; win.x = ax;
win.y = ay; win.y = ay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment