aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-03-24 15:28:36 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 11:11:06 -0400
commitcba8e9b32d0dbe206c4ba60581f7e9a0981214b2 (patch)
tree4b391e798b8a22387d86c8f3fde1224cf809807e
parent88d285965c97f2e6fc878cb2aeff6511b22353e5 (diff)
[media] em28xx: remove function em28xx_compression_disable() and its call
em28xx_compression_disable() is a single line function which is called only one time and this call also isn't needed. Register 0x26 is always configured as part of the scaler configuration, which in turn is always done when the resolution changes. And the initial resolution setting is applied at first device open. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c5
-rw-r--r--drivers/media/usb/em28xx/em28xx.h6
2 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index cdcd7513e6ec..4f66bd360c3c 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -274,7 +274,7 @@ static void em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart,
274 274
275static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v) 275static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v)
276{ 276{
277 u8 mode; 277 u8 mode = 0x00;
278 /* the em2800 scaler only supports scaling down to 50% */ 278 /* the em2800 scaler only supports scaling down to 50% */
279 279
280 if (dev->board.is_em2800) { 280 if (dev->board.is_em2800) {
@@ -293,7 +293,7 @@ static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v)
293 to work correctly */ 293 to work correctly */
294 mode = (h || v) ? 0x30 : 0x00; 294 mode = (h || v) ? 0x30 : 0x00;
295 } 295 }
296 return em28xx_write_reg_bits(dev, EM28XX_R26_COMPR, mode, 0x30); 296 return em28xx_write_reg(dev, EM28XX_R26_COMPR, mode);
297} 297}
298 298
299/* FIXME: this only function read values from dev */ 299/* FIXME: this only function read values from dev */
@@ -2372,7 +2372,6 @@ static int em28xx_v4l2_init(struct em28xx *dev)
2372 (EM28XX_XCLK_AUDIO_UNMUTE | val)); 2372 (EM28XX_XCLK_AUDIO_UNMUTE | val));
2373 2373
2374 em28xx_set_outfmt(dev); 2374 em28xx_set_outfmt(dev);
2375 em28xx_compression_disable(dev);
2376 2375
2377 /* Add image controls */ 2376 /* Add image controls */
2378 /* NOTE: at this point, the subdevices are already registered, so bridge 2377 /* NOTE: at this point, the subdevices are already registered, so bridge
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index e72def688f70..191d05bef6a9 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -794,12 +794,6 @@ int em28xx_init_camera(struct em28xx *dev);
794 printk(KERN_WARNING "%s: "fmt,\ 794 printk(KERN_WARNING "%s: "fmt,\
795 dev->name , ##arg); } while (0) 795 dev->name , ##arg); } while (0)
796 796
797static inline int em28xx_compression_disable(struct em28xx *dev)
798{
799 /* side effect of disabling scaler and mixer */
800 return em28xx_write_reg(dev, EM28XX_R26_COMPR, 0x00);
801}
802
803/*FIXME: maxw should be dependent of alt mode */ 797/*FIXME: maxw should be dependent of alt mode */
804static inline unsigned int norm_maxw(struct em28xx *dev) 798static inline unsigned int norm_maxw(struct em28xx *dev)
805{ 799{