[media] squash lines for simple wrapper functions
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Родитель
4a3229834d
Коммит
29a8d97925
|
@ -1520,12 +1520,8 @@ static int dtv_set_frontend(struct dvb_frontend *fe);
|
||||||
|
|
||||||
static bool is_dvbv3_delsys(u32 delsys)
|
static bool is_dvbv3_delsys(u32 delsys)
|
||||||
{
|
{
|
||||||
bool status;
|
return (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) ||
|
||||||
|
(delsys == SYS_DVBS) || (delsys == SYS_ATSC);
|
||||||
status = (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) ||
|
|
||||||
(delsys == SYS_DVBS) || (delsys == SYS_ATSC);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -586,10 +586,7 @@ static void mchip_hic_stop(void)
|
||||||
/* get the next ready frame from the dma engine */
|
/* get the next ready frame from the dma engine */
|
||||||
static u32 mchip_get_frame(void)
|
static u32 mchip_get_frame(void)
|
||||||
{
|
{
|
||||||
u32 v;
|
return mchip_read(MCHIP_MM_FIR(meye.mchip_fnum));
|
||||||
|
|
||||||
v = mchip_read(MCHIP_MM_FIR(meye.mchip_fnum));
|
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* frees the current frame from the dma engine */
|
/* frees the current frame from the dma engine */
|
||||||
|
|
|
@ -2925,9 +2925,7 @@ static struct saa7146_extension av7110_extension_driver = {
|
||||||
|
|
||||||
static int __init av7110_init(void)
|
static int __init av7110_init(void)
|
||||||
{
|
{
|
||||||
int retval;
|
return saa7146_register_extension(&av7110_extension_driver);
|
||||||
retval = saa7146_register_extension(&av7110_extension_driver);
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -178,20 +178,12 @@ void exynos4_jpeg_set_interrupt(void __iomem *base, unsigned int version)
|
||||||
|
|
||||||
unsigned int exynos4_jpeg_get_int_status(void __iomem *base)
|
unsigned int exynos4_jpeg_get_int_status(void __iomem *base)
|
||||||
{
|
{
|
||||||
unsigned int int_status;
|
return readl(base + EXYNOS4_INT_STATUS_REG);
|
||||||
|
|
||||||
int_status = readl(base + EXYNOS4_INT_STATUS_REG);
|
|
||||||
|
|
||||||
return int_status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int exynos4_jpeg_get_fifo_status(void __iomem *base)
|
unsigned int exynos4_jpeg_get_fifo_status(void __iomem *base)
|
||||||
{
|
{
|
||||||
unsigned int fifo_status;
|
return readl(base + EXYNOS4_FIFO_STATUS_REG);
|
||||||
|
|
||||||
fifo_status = readl(base + EXYNOS4_FIFO_STATUS_REG);
|
|
||||||
|
|
||||||
return fifo_status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value)
|
void exynos4_jpeg_set_huf_table_enable(void __iomem *base, int value)
|
||||||
|
@ -296,10 +288,7 @@ void exynos4_jpeg_set_encode_hoff_cnt(void __iomem *base, unsigned int fmt)
|
||||||
|
|
||||||
unsigned int exynos4_jpeg_get_stream_size(void __iomem *base)
|
unsigned int exynos4_jpeg_get_stream_size(void __iomem *base)
|
||||||
{
|
{
|
||||||
unsigned int size;
|
return readl(base + EXYNOS4_BITSTREAM_SIZE_REG);
|
||||||
|
|
||||||
size = readl(base + EXYNOS4_BITSTREAM_SIZE_REG);
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void exynos4_jpeg_set_dec_bitstream_size(void __iomem *base, unsigned int size)
|
void exynos4_jpeg_set_dec_bitstream_size(void __iomem *base, unsigned int size)
|
||||||
|
|
|
@ -483,11 +483,7 @@ static void cal_get_hwinfo(struct cal_dev *dev)
|
||||||
|
|
||||||
static inline int cal_runtime_get(struct cal_dev *dev)
|
static inline int cal_runtime_get(struct cal_dev *dev)
|
||||||
{
|
{
|
||||||
int r;
|
return pm_runtime_get_sync(&dev->pdev->dev);
|
||||||
|
|
||||||
r = pm_runtime_get_sync(&dev->pdev->dev);
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cal_runtime_put(struct cal_dev *dev)
|
static inline void cal_runtime_put(struct cal_dev *dev)
|
||||||
|
|
|
@ -104,11 +104,7 @@ static inline void fintek_cir_reg_write(struct fintek_dev *fintek, u8 val, u8 of
|
||||||
/* read val from cir config register */
|
/* read val from cir config register */
|
||||||
static u8 fintek_cir_reg_read(struct fintek_dev *fintek, u8 offset)
|
static u8 fintek_cir_reg_read(struct fintek_dev *fintek, u8 offset)
|
||||||
{
|
{
|
||||||
u8 val;
|
return inb(fintek->cir_addr + offset);
|
||||||
|
|
||||||
val = inb(fintek->cir_addr + offset);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dump current cir register contents */
|
/* dump current cir register contents */
|
||||||
|
|
|
@ -156,21 +156,19 @@ struct lme2510_state {
|
||||||
static int lme2510_bulk_write(struct usb_device *dev,
|
static int lme2510_bulk_write(struct usb_device *dev,
|
||||||
u8 *snd, int len, u8 pipe)
|
u8 *snd, int len, u8 pipe)
|
||||||
{
|
{
|
||||||
int ret, actual_l;
|
int actual_l;
|
||||||
|
|
||||||
ret = usb_bulk_msg(dev, usb_sndbulkpipe(dev, pipe),
|
return usb_bulk_msg(dev, usb_sndbulkpipe(dev, pipe),
|
||||||
snd, len , &actual_l, 100);
|
snd, len, &actual_l, 100);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lme2510_bulk_read(struct usb_device *dev,
|
static int lme2510_bulk_read(struct usb_device *dev,
|
||||||
u8 *rev, int len, u8 pipe)
|
u8 *rev, int len, u8 pipe)
|
||||||
{
|
{
|
||||||
int ret, actual_l;
|
int actual_l;
|
||||||
|
|
||||||
ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, pipe),
|
return usb_bulk_msg(dev, usb_rcvbulkpipe(dev, pipe),
|
||||||
rev, len , &actual_l, 200);
|
rev, len, &actual_l, 200);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lme2510_usb_talk(struct dvb_usb_device *d,
|
static int lme2510_usb_talk(struct dvb_usb_device *d,
|
||||||
|
|
|
@ -55,13 +55,9 @@ static inline int m920x_read(struct usb_device *udev, u8 request, u16 value,
|
||||||
static inline int m920x_write(struct usb_device *udev, u8 request,
|
static inline int m920x_write(struct usb_device *udev, u8 request,
|
||||||
u16 value, u16 index)
|
u16 value, u16 index)
|
||||||
{
|
{
|
||||||
int ret;
|
return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), request,
|
||||||
|
USB_TYPE_VENDOR | USB_DIR_OUT, value, index,
|
||||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
NULL, 0, 2000);
|
||||||
request, USB_TYPE_VENDOR | USB_DIR_OUT,
|
|
||||||
value, index, NULL, 0, 2000);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int m920x_write_seq(struct usb_device *udev, u8 request,
|
static inline int m920x_write_seq(struct usb_device *udev, u8 request,
|
||||||
|
|
|
@ -299,10 +299,7 @@ static int jl2005c_stream_start_cif_small(struct gspca_dev *gspca_dev)
|
||||||
|
|
||||||
static int jl2005c_stop(struct gspca_dev *gspca_dev)
|
static int jl2005c_stop(struct gspca_dev *gspca_dev)
|
||||||
{
|
{
|
||||||
int retval;
|
return jl2005c_write_reg(gspca_dev, 0x07, 0x00);
|
||||||
|
|
||||||
retval = jl2005c_write_reg(gspca_dev, 0x07, 0x00);
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -257,11 +257,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
|
||||||
/* this function is called at probe and resume time */
|
/* this function is called at probe and resume time */
|
||||||
static int sd_init(struct gspca_dev *gspca_dev)
|
static int sd_init(struct gspca_dev *gspca_dev)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* connect to the camera and reset it. */
|
/* connect to the camera and reset it. */
|
||||||
ret = sq905c_command(gspca_dev, SQ905C_CLEAR, 0);
|
return sq905c_command(gspca_dev, SQ905C_CLEAR, 0);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up for getting frames. */
|
/* Set up for getting frames. */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче