diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-15 18:06:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-15 18:06:13 -0800 |
commit | dab363f938a53ddaee60bfecc1aebdbb3d3af5f0 (patch) | |
tree | ccdb11a6e6191ba71fbc7716714c47b79172070d /drivers/staging/media | |
parent | a68db9cb858d10820add66682ad4d412f9914288 (diff) | |
parent | 17d2c6439be65777245914be354c5a97c76ad246 (diff) |
Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here's the big staging tree pull request for 3.19-rc1.
We continued to delete more lines than were added, always a good
thing, but not at a huge rate this release, only about 70k lines
removed overall mostly from removing the horrid bcm driver.
Lots of normal staging driver cleanups and fixes all over the place,
well over a thousand of them, the shortlog shows all the horrid
details.
The "contentious" thing here is the movement of the Android binder
code out of staging into the "real" part of the kernel. This is code
that has been stable for a few years now and is working as-is in the
tens of millions of devices with no issues. Yes, the code is horrid,
and the userspace api leaves a lot to be desired, but it's not going
to change due to legacy issues that we have no control over. Because
so many devices and companies rely on this, and the code is stable,
might as well promote it out of staging.
This was all discussed at the Linux Plumbers conference, and everyone
participating agreed that this was the best way forward.
There is work happening to replace the binder code with something new
that is happening right now, but I don't expect to see the results of
that work for another year at the earliest. If that ever happens, and
Android switches over to it, I'll gladly remove this version.
As for maintainers, I'll be glad to maintain this code, I've been
doing it for the past few years with no problems. I'll send a
MAINTAINERS entry for it before 3.19-final is out, still need to talk
to the Google developers about if they are willing to help with it or
not, last I checked they were, which was good.
All of these patches have been in linux-next for a while with no
reported issues"
* tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits)
Staging: slicoss: Fix long line issues in slicoss.c
staging: rtl8712: remove unnecessary else after return
staging: comedi: change some printk calls to pr_err
staging: rtl8723au: hal: Removed the extra semicolon
lustre: Deletion of unnecessary checks before three function calls
staging: lustre: fix sparse warnings: static function declaration
staging: lustre: fixed sparse warnings related to static declarations
staging: unisys: remove duplicate header
staging: unisys: remove unneeded structure
staging: ft1000 : replace __attribute ((__packed__) with __packed
drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c"
Drivers:staging:rtl8192e: Fixed checkpatch warning
Drivers:staging:clocking-wizard: Added a newline
staging: clocking-wizard: check for a valid clk_name pointer
staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts
staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily
staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1()
staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation
staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB()
staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation
...
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/cxd2099/cxd2099.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe.h | 4 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 62 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h | 58 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipeif.h | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_isif.c | 11 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_isif.h | 6 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_resizer.c | 8 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_resizer.h | 2 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_bt829.c | 14 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_imon.c | 27 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_sasem.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_sir.c | 18 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_zilog.c | 137 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_csi2.c | 2 |
17 files changed, 164 insertions, 201 deletions
diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c index 73e7b2c9e4a7..657ea480c6e7 100644 --- a/drivers/staging/media/cxd2099/cxd2099.c +++ b/drivers/staging/media/cxd2099/cxd2099.c @@ -527,7 +527,7 @@ static int slot_reset(struct dvb_ca_en50221 *ca, int slot) u8 val; #endif for (i = 0; i < 100; i++) { - msleep(10); + usleep_range(10000, 11000); #if 0 read_reg(ci, 0x06, &val); dev_info(&ci->i2c->dev, "%d:%02x\n", i, val); diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h index cf4204603eb8..d81b29e19309 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h @@ -120,8 +120,8 @@ struct vpfe_ipipe_device { enum ipipe_input_entity input; unsigned int output; struct v4l2_ctrl_handler ctrls; - void *__iomem base_addr; - void *__iomem isp5_base_addr; + void __iomem *base_addr; + void __iomem *isp5_base_addr; struct ipipe_module_params config; }; diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index 6461de1a61fd..2a3a56b88de1 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c @@ -24,7 +24,7 @@ #define IPIPE_MODE_CONTINUOUS 0 #define IPIPE_MODE_SINGLE_SHOT 1 -static void ipipe_clock_enable(void *__iomem base_addr) +static void ipipe_clock_enable(void __iomem *base_addr) { /* enable IPIPE MMR for register write access */ regw_ip(base_addr, IPIPE_GCK_MMR_DEFAULT, IPIPE_GCK_MMR); @@ -34,7 +34,7 @@ static void ipipe_clock_enable(void *__iomem base_addr) } static void -rsz_set_common_params(void *__iomem rsz_base, struct resizer_params *params) +rsz_set_common_params(void __iomem *rsz_base, struct resizer_params *params) { struct rsz_common_params *rsz_common = ¶ms->rsz_common; u32 val; @@ -66,7 +66,7 @@ rsz_set_common_params(void *__iomem rsz_base, struct resizer_params *params) } static void -rsz_set_rsz_regs(void *__iomem rsz_base, unsigned int rsz_id, +rsz_set_rsz_regs(void __iomem *rsz_base, unsigned int rsz_id, struct resizer_params *params) { struct resizer_scale_param *rsc_params; @@ -171,7 +171,7 @@ rsz_set_rsz_regs(void *__iomem rsz_base, unsigned int rsz_id, /*set the registers of either RSZ0 or RSZ1 */ static void -ipipe_setup_resizer(void *__iomem rsz_base, struct resizer_params *params) +ipipe_setup_resizer(void __iomem *rsz_base, struct resizer_params *params) { /* enable MMR gate to write to Resizer */ regw_rsz(rsz_base, 1, RSZ_GCK_MMR); @@ -302,8 +302,8 @@ int config_rsz_hw(struct vpfe_resizer_device *resizer, struct resizer_params *config) { struct vpfe_device *vpfe_dev = to_vpfe_device(resizer); - void *__iomem ipipe_base = vpfe_dev->vpfe_ipipe.base_addr; - void *__iomem rsz_base = vpfe_dev->vpfe_resizer.base_addr; + void __iomem *ipipe_base = vpfe_dev->vpfe_ipipe.base_addr; + void __iomem *rsz_base = vpfe_dev->vpfe_resizer.base_addr; /* enable VPSS clock */ vpss_enable_clock(VPSS_IPIPE_CLOCK, 1); @@ -315,7 +315,7 @@ int config_rsz_hw(struct vpfe_resizer_device *resizer, } static void -rsz_set_y_address(void *__iomem rsz_base, unsigned int address, +rsz_set_y_address(void __iomem *rsz_base, unsigned int address, unsigned int offset) { u32 val; @@ -330,7 +330,7 @@ rsz_set_y_address(void *__iomem rsz_base, unsigned int address, } static void -rsz_set_c_address(void *__iomem rsz_base, unsigned int address, +rsz_set_c_address(void __iomem *rsz_base, unsigned int address, unsigned int offset) { u32 val; @@ -352,7 +352,7 @@ rsz_set_c_address(void *__iomem rsz_base, unsigned int address, * @address: the address to set */ int -resizer_set_outaddr(void *__iomem rsz_base, struct resizer_params *params, +resizer_set_outaddr(void __iomem *rsz_base, struct resizer_params *params, int resize_no, unsigned int address) { struct resizer_scale_param *rsc_param; @@ -411,7 +411,7 @@ resizer_set_outaddr(void *__iomem rsz_base, struct resizer_params *params, } void -ipipe_set_lutdpc_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, +ipipe_set_lutdpc_regs(void __iomem *base_addr, void __iomem *isp5_base_addr, struct vpfe_ipipe_lutdpc *dpc) { u32 max_tbl_size = LUT_DPC_MAX_SIZE >> 1; @@ -446,7 +446,7 @@ ipipe_set_lutdpc_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, } static void -set_dpc_thresholds(void *__iomem base_addr, +set_dpc_thresholds(void __iomem *base_addr, struct vpfe_ipipe_otfdpc_2_0_cfg *dpc_thr) { regw_ip(base_addr, dpc_thr->corr_thr.r & OTFDPC_DPC2_THR_MASK, @@ -467,7 +467,7 @@ set_dpc_thresholds(void *__iomem base_addr, DPC_OTF_2D_THR_B); } -void ipipe_set_otfdpc_regs(void *__iomem base_addr, +void ipipe_set_otfdpc_regs(void __iomem *base_addr, struct vpfe_ipipe_otfdpc *otfdpc) { struct vpfe_ipipe_otfdpc_2_0_cfg *dpc_2_0 = &otfdpc->alg_cfg.dpc_2_0; @@ -523,7 +523,7 @@ void ipipe_set_otfdpc_regs(void *__iomem base_addr, /* 2D Noise filter */ void -ipipe_set_d2f_regs(void *__iomem base_addr, unsigned int id, +ipipe_set_d2f_regs(void __iomem *base_addr, unsigned int id, struct vpfe_ipipe_nf *noise_filter) { @@ -571,7 +571,7 @@ ipipe_set_d2f_regs(void *__iomem base_addr, unsigned int id, (((decimal & 0x1f) | ((integer & 0x7) << 5))) /* Green Imbalance Correction */ -void ipipe_set_gic_regs(void *__iomem base_addr, struct vpfe_ipipe_gic *gic) +void ipipe_set_gic_regs(void __iomem *base_addr, struct vpfe_ipipe_gic *gic) { u32 val; @@ -609,7 +609,7 @@ void ipipe_set_gic_regs(void *__iomem base_addr, struct vpfe_ipipe_gic *gic) #define IPIPE_U13Q9(decimal, integer) \ (((decimal & 0x1ff) | ((integer & 0xf) << 9))) /* White balance */ -void ipipe_set_wb_regs(void *__iomem base_addr, struct vpfe_ipipe_wb *wb) +void ipipe_set_wb_regs(void __iomem *base_addr, struct vpfe_ipipe_wb *wb) { u32 val; @@ -635,7 +635,7 @@ void ipipe_set_wb_regs(void *__iomem base_addr, struct vpfe_ipipe_wb *wb) } /* CFA */ -void ipipe_set_cfa_regs(void *__iomem base_addr, struct vpfe_ipipe_cfa *cfa) +void ipipe_set_cfa_regs(void __iomem *base_addr, struct vpfe_ipipe_cfa *cfa) { ipipe_clock_enable(base_addr); @@ -671,7 +671,7 @@ void ipipe_set_cfa_regs(void *__iomem base_addr, struct vpfe_ipipe_cfa *cfa) } void -ipipe_set_rgb2rgb_regs(void *__iomem base_addr, unsigned int id, +ipipe_set_rgb2rgb_regs(void __iomem *base_addr, unsigned int id, struct vpfe_ipipe_rgb2rgb *rgb) { u32 offset_mask = RGB2RGB_1_OFST_MASK; @@ -724,7 +724,7 @@ ipipe_set_rgb2rgb_regs(void *__iomem base_addr, unsigned int id, } static void -ipipe_update_gamma_tbl(void *__iomem isp5_base_addr, +ipipe_update_gamma_tbl(void __iomem *isp5_base_addr, struct vpfe_ipipe_gamma_entry *table, int size, u32 addr) { int count; @@ -738,7 +738,7 @@ ipipe_update_gamma_tbl(void *__iomem isp5_base_addr, } void -ipipe_set_gamma_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, +ipipe_set_gamma_regs(void __iomem *base_addr, void __iomem *isp5_base_addr, struct vpfe_ipipe_gamma *gamma) { int table_size; @@ -770,7 +770,7 @@ ipipe_set_gamma_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, } void -ipipe_set_3d_lut_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, +ipipe_set_3d_lut_regs(void __iomem *base_addr, void __iomem *isp5_base_addr, struct vpfe_ipipe_3d_lut *lut_3d) { struct vpfe_ipipe_3d_lut_entry *tbl; @@ -819,7 +819,7 @@ ipipe_set_3d_lut_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, /* Lumina adjustments */ void -ipipe_set_lum_adj_regs(void *__iomem base_addr, struct ipipe_lum_adj *lum_adj) +ipipe_set_lum_adj_regs(void __iomem *base_addr, struct ipipe_lum_adj *lum_adj) { u32 val; @@ -834,7 +834,7 @@ ipipe_set_lum_adj_regs(void *__iomem base_addr, struct ipipe_lum_adj *lum_adj) #define IPIPE_S12Q8(decimal, integer) \ (((decimal & 0xff) | ((integer & 0xf) << 8))) -void ipipe_set_rgb2ycbcr_regs(void *__iomem base_addr, +void ipipe_set_rgb2ycbcr_regs(void __iomem *base_addr, struct vpfe_ipipe_rgb2yuv *yuv) { u32 val; @@ -866,7 +866,7 @@ void ipipe_set_rgb2ycbcr_regs(void *__iomem base_addr, /* YUV 422 conversion */ void -ipipe_set_yuv422_conv_regs(void *__iomem base_addr, +ipipe_set_yuv422_conv_regs(void __iomem *base_addr, struct vpfe_ipipe_yuv422_conv *conv) { u32 val; @@ -879,7 +879,7 @@ ipipe_set_yuv422_conv_regs(void *__iomem base_addr, } void -ipipe_set_gbce_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, +ipipe_set_gbce_regs(void __iomem *base_addr, void __iomem *isp5_base_addr, struct vpfe_ipipe_gbce *gbce) { unsigned int count; @@ -906,7 +906,7 @@ ipipe_set_gbce_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, } void -ipipe_set_ee_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, +ipipe_set_ee_regs(void __iomem *base_addr, void __iomem *isp5_base_addr, struct vpfe_ipipe_yee *ee) { unsigned int count; @@ -950,7 +950,7 @@ ipipe_set_ee_regs(void *__iomem base_addr, void *__iomem isp5_base_addr, } /* Chromatic Artifact Correction. CAR */ -static void ipipe_set_mf(void *__iomem base_addr) +static void ipipe_set_mf(void __iomem *base_addr) { /* typ to dynamic switch */ regw_ip(base_addr, VPFE_IPIPE_CAR_DYN_SWITCH, CAR_TYP); @@ -959,7 +959,7 @@ static void ipipe_set_mf(void *__iomem base_addr) } static void -ipipe_set_gain_ctrl(void *__iomem base_addr, struct vpfe_ipipe_car *car) +ipipe_set_gain_ctrl(void __iomem *base_addr, struct vpfe_ipipe_car *car) { regw_ip(base_addr, VPFE_IPIPE_CAR_CHR_GAIN_CTRL, CAR_TYP); regw_ip(base_addr, car->hpf, CAR_HPF_TYP); @@ -975,7 +975,7 @@ ipipe_set_gain_ctrl(void *__iomem base_addr, struct vpfe_ipipe_car *car) CAR_GN2_MIN); } -void ipipe_set_car_regs(void *__iomem base_addr, struct vpfe_ipipe_car *car) +void ipipe_set_car_regs(void __iomem *base_addr, struct vpfe_ipipe_car *car) { u32 val; @@ -1010,7 +1010,7 @@ void ipipe_set_car_regs(void *__iomem base_addr, struct vpfe_ipipe_car *car) } /* Chromatic Gain Suppression */ -void ipipe_set_cgs_regs(void *__iomem base_addr, struct vpfe_ipipe_cgs *cgs) +void ipipe_set_cgs_regs(void __iomem *base_addr, struct vpfe_ipipe_cgs *cgs) { ipipe_clock_enable(base_addr); regw_ip(base_addr, cgs->en, CGS_EN); @@ -1025,12 +1025,12 @@ void ipipe_set_cgs_regs(void *__iomem base_addr, struct vpfe_ipipe_cgs *cgs) regw_ip(base_addr, cgs->h_min, CGS_GN1_H_MIN); } -void rsz_src_enable(void *__iomem rsz_base, int enable) +void rsz_src_enable(void __iomem *rsz_base, int enable) { regw_rsz(rsz_base, enable, RSZ_SRC_EN); } -int rsz_enable(void *__iomem rsz_base, int rsz_id, int enable) +int rsz_enable(void __iomem *rsz_base, int rsz_id, int enable) { if (rsz_id == RSZ_A) { regw_rsz(rsz_base, enable, RSZ_EN_A); diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h index 81176fb9d164..2bf2f7a69173 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h @@ -490,29 +490,29 @@ #define RSZ_RGB_TYP_SHIFT 0 #define RSZ_RGB_ALPHA_MASK 0xff -static inline u32 regr_ip(void *__iomem addr, u32 offset) +static inline u32 regr_ip(void __iomem *addr, u32 offset) { return readl(addr + offset); } -static inline void regw_ip(void *__iomem addr, u32 val, u32 offset) +static inline void regw_ip(void __iomem *addr, u32 val, u32 offset) { writel(val, addr + offset); } -static inline u32 w_ip_table(void *__iomem addr, u32 val, u32 offset) +static inline u32 w_ip_table(void __iomem *addr, u32 val, u32 offset) { writel(val, addr + offset); return val; } -static inline u32 regr_rsz(void *__iomem addr, u32 offset) +static inline u32 regr_rsz(void __iomem *addr, u32 offset) { return readl(addr + offset); } -static inline u32 regw_rsz(void *__iomem addr, u32 val, u32 offset) +static inline u32 regw_rsz(void __iomem *addr, u32 val, u32 offset) { writel(val, addr + offset); @@ -520,39 +520,39 @@ static inline u32 regw_rsz(void *__iomem addr, u32 val, u32 offset) } int config_ipipe_hw(struct vpfe_ipipe_device *ipipe); -int resizer_set_outaddr(void *__iomem rsz_base, struct resizer_params *params, +int resizer_set_outaddr(void __iomem *rsz_base, struct resizer_params *params, int resize_no, unsigned int address); -int rsz_enable(void *__iomem rsz_base, int rsz_id, int enable); -void rsz_src_enable(void *__iomem rsz_base, int enable); +int rsz_enable(void __iomem *rsz_base, int rsz_id, int enable); +void rsz_src_enable(void __iomem *rsz_base, int enable); void rsz_set_in_pix_format(unsigned char y_c); int config_rsz_hw(struct vpfe_resizer_device *resizer, struct resizer_params *config); -void ipipe_set_d2f_regs(void *__iomem base_addr, unsigned int id, +void ipipe_set_d2f_regs(void __iomem *base_addr, unsigned int id, struct vpfe_ipipe_nf *noise_filter); -void ipipe_set_rgb2rgb_regs(void *__iomem base_addr, unsigned int id, +void ipipe_set_rgb2rgb_regs(void __iomem *base_addr, unsigned int id, struct vpfe_ipipe_rgb2rgb *rgb); -void ipipe_set_yuv422_conv_regs(void *__iomem base_addr, +void ipipe_set_yuv422_conv_regs(void __iomem *base_addr, struct vpfe_ipipe_yuv422_conv *conv); -void ipipe_set_lum_adj_regs(void *__iomem base_addr, +void ipipe_set_lum_adj_regs(void __iomem *base_addr, struct ipipe_lum_adj *lum_adj); -void ipipe_set_rgb2ycbcr_regs(void *__iomem base_addr, +void ipipe_set_rgb2ycbcr_regs(void __iomem *base_addr, struct vpfe_ipipe_rgb2yuv *yuv); -void ipipe_set_lutdpc_regs(void *__iomem base_addr, - void *__iomem isp5_base_addr, struct vpfe_ipipe_lutdpc *lutdpc); -void ipipe_set_otfdpc_regs(void *__iomem base_addr, +void ipipe_set_lutdpc_regs(void __iomem *base_addr, + void __iomem *isp5_base_addr, struct vpfe_ipipe_lutdpc *lutdpc); +void ipipe_set_otfdpc_regs(void __iomem *base_addr, struct vpfe_ipipe_otfdpc *otfdpc); -void ipipe_set_3d_lut_regs(void *__iomem base_addr, - void *__iomem isp5_base_addr, struct vpfe_ipipe_3d_lut *lut_3d); -void ipipe_set_gamma_regs(void *__iomem base_addr, - void *__iomem isp5_base_addr, struct vpfe_ipipe_gamma *gamma); -void ipipe_set_ee_regs(void *__iomem base_addr, - void *__iomem isp5_base_addr, struct vpfe_ipipe_yee *ee); -void ipipe_set_gbce_regs(void *__iomem base_addr, - void *__iomem isp5_base_addr, struct vpfe_ipipe_gbce *gbce); -void ipipe_set_gic_regs(void *__iomem base_addr, struct vpfe_ipipe_gic *gic); -void ipipe_set_cfa_regs(void *__iomem base_addr, struct vpfe_ipipe_cfa *cfa); -void ipipe_set_car_regs(void *__iomem base_addr, struct vpfe_ipipe_car *car); -void ipipe_set_cgs_regs(void *__iomem base_addr, struct vpfe_ipipe_cgs *cgs); -void ipipe_set_wb_regs(void *__iomem base_addr, struct vpfe_ipipe_wb *wb); +void ipipe_set_3d_lut_regs(void __iomem *base_addr, + void __iomem *isp5_base_addr, struct vpfe_ipipe_3d_lut *lut_3d); +void ipipe_set_gamma_regs(void __iomem *base_addr, + void __iomem *isp5_base_addr, struct vpfe_ipipe_gamma *gamma); +void ipipe_set_ee_regs(void __iomem *base_addr, + void __iomem *isp5_base_addr, struct vpfe_ipipe_yee *ee); +void ipipe_set_gbce_regs(void __iomem *base_addr, + void __iomem *isp5_base_addr, struct vpfe_ipipe_gbce *gbce); +void ipipe_set_gic_regs(void __iomem *base_addr, struct vpfe_ipipe_gic *gic); +void ipipe_set_cfa_regs(void __iomem *base_addr, struct vpfe_ipipe_cfa *cfa); +void ipipe_set_car_regs(void __iomem *base_addr, struct vpfe_ipipe_car *car); +void ipipe_set_cgs_regs(void __iomem *base_addr, struct vpfe_ipipe_cgs *cgs); +void ipipe_set_wb_regs(void __iomem *base_addr, struct vpfe_ipipe_wb *wb); #endif /* _DAVINCI_VPFE_DM365_IPIPE_HW_H */ diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index a86f16ff5818..87d42e18377d 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -421,7 +421,7 @@ static int ipipeif_get_config(struct v4l2_subdev *sd, void __user *arg) { struct vpfe_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd); - struct ipipeif_params *config = (struct ipipeif_params *)arg; + struct ipipeif_params *config = arg; struct device *dev = ipipeif->subdev.v4l2_dev->dev; if (!arg) { @@ -462,7 +462,7 @@ ipipeif_get_config(struct v4l2_subdev *sd, void __user *arg) static long ipipeif_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { - struct ipipeif_params *config = (struct ipipeif_params *)arg; + struct ipipeif_params *config = arg; int ret = -ENOIOCTLCMD; switch (cmd) { diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h index 608701fc5fed..cea3d61335af 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h @@ -134,7 +134,7 @@ struct vpfe_ipipeif_device { unsigned int output; struct vpfe_video_device video_in; struct v4l2_ctrl_handler ctrls; - void *__iomem ipipeif_base_addr; + void __iomem *ipipeif_base_addr; struct ipipeif_params config; int dpcm_predictor; int gain; diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c index fa26f63831b7..0ba0bf2c1cff 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_isif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c @@ -70,17 +70,17 @@ static const u32 isif_srggb_pattern = ISIF_COLPTN_Gb_G << ISIF_CCOLP_CP15_4 | ISIF_COLPTN_B_Mg << ISIF_CCOLP_CP17_6; -static inline u32 isif_read(void *__iomem base_addr, u32 offset) +static inline u32 isif_read(void __iomem *base_addr, u32 offset) { return readl(base_addr + offset); } -static inline void isif_write(void *__iomem base_addr, u32 val, u32 offset) +static inline void isif_write(void __iomem *base_addr, u32 val, u32 offset) { writel(val, base_addr + offset); } -static inline u32 isif_merge(void *__iomem base_addr, u32 mask, u32 val, +static inline u32 isif_merge(void __iomem *base_addr, u32 mask, u32 val, u32 offset) { u32 new_val = (isif_read(base_addr, offset) & ~mask) | (val & mask); @@ -646,7 +646,7 @@ static void isif_config_gain_offset(struct vpfe_isif_device *isif) { struct vpfe_isif_gain_offsets_adj *gain_off_ptr = &isif->isif_cfg.bayer.config_params.gain_offset; - void *__iomem base = isif->isif_cfg.base_addr; + void __iomem *base = isif->isif_cfg.base_addr; u32 val; val = ((gain_off_ptr->gain_sdram_en & 1) << GAIN_SDRAM_EN_SHIFT) | @@ -1602,6 +1602,7 @@ isif_pad_get_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, if (crop->which == V4L2_SUBDEV_FORMAT_TRY) { struct v4l2_rect *rect; + rect = v4l2_subdev_get_try_crop(fh, ISIF_PAD_SINK); memcpy(&crop->rect, rect, sizeof(*rect)); } else { @@ -1991,7 +1992,7 @@ int vpfe_isif_init(struct vpfe_isif_device *isif, struct platform_device *pdev) struct media_entity *me = &sd->entity; static resource_size_t res_len; struct resource *res; - void *__iomem addr; + void __iomem *addr; int status; int i = 0; diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.h b/drivers/staging/media/davinci_vpfe/dm365_isif.h index 473fd2cfe350..89e814e9c0d7 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_isif.h +++ b/drivers/staging/media/davinci_vpfe/dm365_isif.h @@ -159,9 +159,9 @@ struct isif_oper_config { struct isif_params_raw bayer; enum isif_data_pack data_pack; struct isif_gain_values isif_gain_params; - void *__iomem base_addr; - void *__iomem linear_tbl0_addr; - void *__iomem linear_tbl1_addr; + void __iomem *base_addr; + void __iomem *linear_tbl0_addr; + void __iomem *linear_tbl1_addr; }; #define ISIF_PAD_SINK 0 diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index e0b29c8ca221..75e70e14b724 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -149,7 +149,7 @@ configure_resizer_out_params(struct vpfe_resizer_device *resizer, int index, param->rsz_en[index] = DISABLE; return; } - output = (struct vpfe_rsz_output_spec *)output_spec; + output = output_spec; param->rsz_en[index] = ENABLE; if (partial) { param->rsz_rsc_param[index].h_flip = output->h_flip; @@ -633,7 +633,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width, if (!(val % 2)) { h1 = val; } else { - val = (input_width << 7); + val = input_width << 7; val -= rsz >> 1; val /= rsz << 1; val <<= 1; @@ -1218,12 +1218,12 @@ static long resizer_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) switch (cmd) { case VIDIOC_VPFE_RSZ_S_CONFIG: - user_config = (struct vpfe_rsz_config *)arg; + user_config = arg; ret = resizer_set_configuration(resizer, user_config); break; case VIDIOC_VPFE_RSZ_G_CONFIG: - user_config = (struct vpfe_rsz_config *)arg; + user_config = arg; if (!user_config->config) { dev_err(dev, "error in VIDIOC_VPFE_RSZ_G_CONFIG\n"); return -EINVAL; diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.h b/drivers/staging/media/davinci_vpfe/dm365_resizer.h index 59a79422b914..93b0f44030aa 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.h +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.h @@ -228,7 +228,7 @@ struct vpfe_resizer_device { struct dm365_resizer_device resizer_a; struct dm365_resizer_device resizer_b; struct resizer_params config; - void *__iomem base_addr; + void __iomem *base_addr; }; int vpfe_resizer_init(struct vpfe_resizer_device *vpfe_rsz, diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c index 4c806ba41323..44f565547179 100644 --- a/drivers/staging/media/lirc/lirc_bt829.c +++ b/drivers/staging/media/lirc/lirc_bt829.c @@ -56,11 +56,6 @@ static unsigned char do_get_bits(void); #define DRIVER_NAME "lirc_bt829" static bool debug; -#define dprintk(fmt, args...) \ - do { \ - if (debug) \ - printk(KERN_DEBUG DRIVER_NAME ": "fmt, ## args); \ - } while (0) static int atir_minor; static phys_addr_t pci_addr_phys; @@ -101,7 +96,7 @@ static int atir_add_to_buf(void *data, struct lirc_buffer *buf) status = poll_main(); key = (status >> 8) & 0xFF; if (status & 0xFF) { - dprintk("reading key %02X\n", key); + dev_dbg(atir_driver.dev, "reading key %02X\n", key); lirc_buffer_write(buf, &key); return 0; } @@ -110,13 +105,13 @@ static int atir_add_to_buf(void *data, struct lirc_buffer *buf) static int atir_set_use_inc(void *data) { - dprintk("driver is opened\n"); + dev_dbg(atir_driver.dev, "driver is opened\n"); return 0; } static void atir_set_use_dec(void *data) { - dprintk("driver is closed\n"); + dev_dbg(atir_driver.dev, "driver is closed\n"); } int init_module(void) @@ -154,7 +149,8 @@ int init_module(void) rc = atir_minor; goto err_unmap; } - dprintk("driver is registered on minor %d\n", atir_minor); + dev_dbg(atir_driver.dev, "driver is registered on minor %d\n", + atir_minor); return 0; diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c index 232edd5b1742..9ce7d9990e3e 100644 --- a/drivers/staging/media/lirc/lirc_imon.c +++ b/drivers/staging/media/lirc/lirc_imon.c @@ -495,7 +495,7 @@ static int ir_open(void *data) /* prevent races with disconnect */ mutex_lock(&driver_lock); - context = (struct imon_context *)data; + context = data; /* initial IR protocol decode variables */ context->rx.count = 0; @@ -516,7 +516,7 @@ static void ir_close(void *data) { struct imon_context *context; - context = (struct imon_context *)data; + context = data; if (!context) { pr_err("%s: no context for device\n", __func__); return; @@ -572,29 +572,6 @@ static void submit_data(struct imon_context *context) wake_up(&context->driver->rbuf->wait_poll); } -static inline int tv2int(const struct timeval *a, const struct timeval *b) -{ - int usecs = 0; - int sec = 0; - - if (b->tv_usec > a->tv_usec) { - usecs = 1000000; - sec--; - } - - usecs += a->tv_usec - b->tv_usec; - - sec += a->tv_sec - b->tv_sec; - sec *= 1000; - usecs /= 1000; - sec += usecs; - - if (sec < 0) - sec = 1000; - - return sec; -} - /** * Process the incoming packet */ diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index 2f0463eb9887..4a268200cbf5 100644 --- a/drivers/staging/media/lirc/lirc_sasem.c +++ b/drivers/staging/media/lirc/lirc_sasem.c @@ -488,7 +488,7 @@ static int ir_open(void *data) /* prevent races with disconnect */ mutex_lock(&disconnect_lock); - context = (struct sasem_context *) data; + context = data; mutex_lock(&context->ctx_lock); @@ -530,7 +530,7 @@ static void ir_close(void *data) { struct sasem_context *context; - context = (struct sasem_context *)data; + context = data; if (!context) { pr_err("%s: no context for device\n", __func__); return; diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index e961b5218215..39f4733fb1ee 100644 --- a/drivers/staging/media/lirc/lirc_sir.c +++ b/drivers/staging/media/lirc/lirc_sir.c @@ -140,12 +140,6 @@ static int rx_buf[RBUF_LEN]; static unsigned int rx_tail, rx_head; static bool debug; -#define dprintk(fmt, args...) \ - do { \ - if (debug) \ - printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ - fmt, ## args); \ - } while (0) /* SECTION: Prototypes */ @@ -322,7 +316,7 @@ static void add_read_queue(int flag, unsigned long val) unsigned int new_rx_tail; int newval; - dprintk("add flag %d with val %lu\n", flag, val); + pr_debug("add flag %d with val %lu\n", flag, val); newval = val & PULSE_MASK; @@ -342,7 +336,7 @@ static void add_read_queue(int flag, unsigned long val) } new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); if (new_rx_tail == rx_head) { - dprintk("Buffer overrun.\n"); + pr_debug("Buffer overrun.\n"); return; } rx_buf[rx_tail] = newval; @@ -439,7 +433,8 @@ static void sir_timeout(unsigned long data) outb(UART_FCR_CLEAR_RCVR, io + UART_FCR); /* determine 'virtual' pulse end: */ pulse_end = delta(&last_tv, &last_intr_tv); - dprintk("timeout add %d for %lu usec\n", last_value, pulse_end); + dev_dbg(driver.dev, "timeout add %d for %lu usec\n", + last_value, pulse_end); add_read_queue(last_value, pulse_end); last_value = 0; last_tv = last_intr_tv; @@ -479,14 +474,15 @@ static irqreturn_t sir_interrupt(int irq, void *dev_id) do_gettimeofday(&curr_tv); deltv = delta(&last_tv, &curr_tv); deltintrtv = delta(&last_intr_tv, &curr_tv); - dprintk("t %lu, d %d\n", deltintrtv, (int)data); + dev_dbg(driver.dev, "t %lu, d %d\n", + deltintrtv, (int)data); /* * if nothing came in last X cycles, * it was gap */ if (deltintrtv > TIME_CONST * threshold) { if (last_value) { - dprintk("GAP\n"); + dev_dbg(driver.dev, "GAP\n"); /* simulate signal change */ add_read_queue(last_value, deltv - diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index 1e15d2cab727..cc872fb4ca68 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -152,23 +152,12 @@ struct tx_data_struct { static struct tx_data_struct *tx_data; static struct mutex tx_data_lock; -#define zilog_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, \ - ## args) -#define zilog_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) -#define zilog_info(s, args...) printk(KERN_INFO KBUILD_MODNAME ": " s, ## args) /* module parameters */ static bool debug; /* debug output */ static bool tx_only; /* only handle the IR Tx function */ static int minor = -1; /* minor number */ -#define dprintk(fmt, args...) \ - do { \ - if (debug) \ |