diff options
author | Lars Lindley <lindley@coyote.org> | 2010-03-11 00:21:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:36 -0700 |
commit | 641b63f9981a082eeefab3b395203a54dcd6e93b (patch) | |
tree | f1d8a4074fde3b34023a5399b07bfe265f5dd8ea /drivers/staging/crystalhd | |
parent | 15df6385d940ad5486b4c2de8ab45979b13349fe (diff) | |
download | kernel_samsung_tuna-641b63f9981a082eeefab3b395203a54dcd6e93b.zip kernel_samsung_tuna-641b63f9981a082eeefab3b395203a54dcd6e93b.tar.gz kernel_samsung_tuna-641b63f9981a082eeefab3b395203a54dcd6e93b.tar.bz2 |
Staging: crystalhd: Whitespace fixes, indentation fixes and 3 changed #includes
These patches fixes some whitspace and indentation warnings from
checkpatch.pl
Also these changed #includes:
bc_dts_glob_lnx.h:43: WARNING: Use #include <linux/param.h> instead of <asm/param.h>
rystalhd_lnx.h:45: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
crystalhd_lnx.h:49: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
It all compiles fine, but I don't have the hardware to test with..
Signed-off-by: Lars Lindley <lindley@coyote.org>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/crystalhd')
-rw-r--r-- | drivers/staging/crystalhd/bc_dts_glob_lnx.h | 2 | ||||
-rw-r--r-- | drivers/staging/crystalhd/bc_dts_types.h | 2 | ||||
-rw-r--r-- | drivers/staging/crystalhd/bcm_70012_regs.h | 24 | ||||
-rw-r--r-- | drivers/staging/crystalhd/crystalhd_cmds.c | 20 | ||||
-rw-r--r-- | drivers/staging/crystalhd/crystalhd_cmds.h | 2 | ||||
-rw-r--r-- | drivers/staging/crystalhd/crystalhd_lnx.c | 26 | ||||
-rw-r--r-- | drivers/staging/crystalhd/crystalhd_lnx.h | 4 | ||||
-rw-r--r-- | drivers/staging/crystalhd/crystalhd_misc.c | 18 |
8 files changed, 49 insertions, 49 deletions
diff --git a/drivers/staging/crystalhd/bc_dts_glob_lnx.h b/drivers/staging/crystalhd/bc_dts_glob_lnx.h index b3125e3..0fd34e2 100644 --- a/drivers/staging/crystalhd/bc_dts_glob_lnx.h +++ b/drivers/staging/crystalhd/bc_dts_glob_lnx.h @@ -40,7 +40,7 @@ #include <sys/time.h> #include <time.h> #include <arpa/inet.h> -#include <asm/param.h> +#include <linux/param.h> #include <linux/ioctl.h> #include <sys/select.h> diff --git a/drivers/staging/crystalhd/bc_dts_types.h b/drivers/staging/crystalhd/bc_dts_types.h index ac0c817..95a2f87 100644 --- a/drivers/staging/crystalhd/bc_dts_types.h +++ b/drivers/staging/crystalhd/bc_dts_types.h @@ -25,7 +25,7 @@ #ifndef _BC_DTS_TYPES_H_ #define _BC_DTS_TYPES_H_ -#ifdef __LINUX_USER__ // Don't include these for KERNEL.. +#ifdef __LINUX_USER__ /* Don't include these for KERNEL.. */ #include <stdint.h> #endif diff --git a/drivers/staging/crystalhd/bcm_70012_regs.h b/drivers/staging/crystalhd/bcm_70012_regs.h index 6922f54..f3ab314 100644 --- a/drivers/staging/crystalhd/bcm_70012_regs.h +++ b/drivers/staging/crystalhd/bcm_70012_regs.h @@ -25,22 +25,22 @@ * m = memory, c = core, r = register, f = field, d = data. */ #if !defined(GET_FIELD) && !defined(SET_FIELD) -#define BRCM_ALIGN(c,r,f) c##_##r##_##f##_ALIGN -#define BRCM_BITS(c,r,f) c##_##r##_##f##_BITS -#define BRCM_MASK(c,r,f) c##_##r##_##f##_MASK -#define BRCM_SHIFT(c,r,f) c##_##r##_##f##_SHIFT +#define BRCM_ALIGN(c, r, f) c##_##r##_##f##_ALIGN +#define BRCM_BITS(c, r, f) c##_##r##_##f##_BITS +#define BRCM_MASK(c, r, f) c##_##r##_##f##_MASK +#define BRCM_SHIFT(c, r, f) c##_##r##_##f##_SHIFT -#define GET_FIELD(m,c,r,f) \ - ((((m) & BRCM_MASK(c,r,f)) >> BRCM_SHIFT(c,r,f)) << BRCM_ALIGN(c,r,f)) +#define GET_FIELD(m, c, r, f) \ + ((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << BRCM_ALIGN(c, r, f)) -#define SET_FIELD(m,c,r,f,d) \ - ((m) = (((m) & ~BRCM_MASK(c,r,f)) | ((((d) >> BRCM_ALIGN(c,r,f)) << \ - BRCM_SHIFT(c,r,f)) & BRCM_MASK(c,r,f))) \ +#define SET_FIELD(m, c, r, f, d) \ + ((m) = (((m) & ~BRCM_MASK(c, r, f)) | ((((d) >> BRCM_ALIGN(c, r, f)) << \ + BRCM_SHIFT(c, r, f)) & BRCM_MASK(c, r, f))) \ ) -#define SET_TYPE_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,c##_##d) -#define SET_NAME_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,c##_##r##_##f##_##d) -#define SET_VALUE_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,d) +#define SET_TYPE_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, c##_##d) +#define SET_NAME_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, c##_##r##_##f##_##d) +#define SET_VALUE_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, d) #endif /* GET & SET */ diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c index 26145a8..d826715 100644 --- a/drivers/staging/crystalhd/crystalhd_cmds.c +++ b/drivers/staging/crystalhd/crystalhd_cmds.c @@ -88,7 +88,7 @@ static BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx, return BC_STS_SUCCESS; } if (ctx->state != BC_LINK_INVALID) { - BCMLOG_ERR("Link invalid state %d \n", ctx->state); + BCMLOG_ERR("Link invalid state %d\n", ctx->state); return BC_STS_ERR_USAGE; } /* Check for duplicate playback sessions..*/ @@ -301,7 +301,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx, } if (ctx->state != BC_LINK_INVALID) { - BCMLOG_ERR("Link invalid state %d \n", ctx->state); + BCMLOG_ERR("Link invalid state %d\n", ctx->state); return BC_STS_ERR_USAGE; } @@ -309,7 +309,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx, idata->add_cdata_sz); if (sts != BC_STS_SUCCESS) { - BCMLOG_ERR("Firmware Download Failure!! - %d\n", sts); + BCMLOG_ERR("Firmware Download Failure!! - %d\n", sts) } else ctx->state |= BC_LINK_INIT; @@ -335,7 +335,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d uint32_t *cmd; if (!(ctx->state & BC_LINK_INIT)) { - BCMLOG_ERR("Link invalid state %d \n", ctx->state); + BCMLOG_ERR("Link invalid state %d\n", ctx->state); return BC_STS_ERR_USAGE; } @@ -379,7 +379,7 @@ static void bc_proc_in_completion(crystalhd_dio_req *dio_hnd, return; } if (sts == BC_STS_IO_USER_ABORT) - return; + return; dio_hnd->uinfo.comp_sts = sts; dio_hnd->uinfo.ev_sts = 1; @@ -452,7 +452,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx, if (!rc) { return dio->uinfo.comp_sts; } else if (rc == -EBUSY) { - BCMLOG(BCMLOG_DBG, "_tx_post() T/O \n"); + BCMLOG(BCMLOG_DBG, "_tx_post() T/O\n"); sts = BC_STS_TIMEOUT; } else if (rc == -EINTR) { BCMLOG(BCMLOG_DBG, "Tx Wait Signal int.\n"); @@ -482,7 +482,7 @@ static BC_STATUS bc_cproc_check_inbuffs(bool pin, void *ubuff, uint32_t ub_sz, /* Check for alignment */ if (((uintptr_t)ubuff) & 0x03) { - BCMLOG_ERR("%s-->Un-aligned address not implemented yet.. %p \n", + BCMLOG_ERR("%s-->Un-aligned address not implemented yet.. %p\n", ((pin) ? "TX" : "RX"), ubuff); return BC_STS_NOT_IMPL; } @@ -523,7 +523,7 @@ static BC_STATUS bc_cproc_proc_input(struct crystalhd_cmd *ctx, crystalhd_ioctl_ sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, 0, 0, 1, &dio_hnd); if (sts != BC_STS_SUCCESS) { - BCMLOG_ERR("dio map - %d \n", sts); + BCMLOG_ERR("dio map - %d\n", sts); return sts; } @@ -563,7 +563,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx, sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, uv_off, en_422, 0, &dio_hnd); if (sts != BC_STS_SUCCESS) { - BCMLOG_ERR("dio map - %d \n", sts); + BCMLOG_ERR("dio map - %d\n", sts); return sts; } @@ -1026,7 +1026,7 @@ crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cm if (g_crystalhd_cproc_tbl[i].cmd_id == cmd) { if ((uc->mode == DTS_MONITOR_MODE) && (g_crystalhd_cproc_tbl[i].block_mon)) { - BCMLOG(BCMLOG_INFO, "Blocking cmd %d \n", cmd); + BCMLOG(BCMLOG_INFO, "Blocking cmd %d\n", cmd); break; } cproc = g_crystalhd_cproc_tbl[i].cmd_proc; diff --git a/drivers/staging/crystalhd/crystalhd_cmds.h b/drivers/staging/crystalhd/crystalhd_cmds.h index 6b290ae..9989038 100644 --- a/drivers/staging/crystalhd/crystalhd_cmds.h +++ b/drivers/staging/crystalhd/crystalhd_cmds.h @@ -66,7 +66,7 @@ struct crystalhd_cmd { struct crystalhd_hw hw_ctx; }; -typedef BC_STATUS (*crystalhd_cmd_proc)(struct crystalhd_cmd *, crystalhd_ioctl_data *); +typedef BC_STATUS(*crystalhd_cmd_proc)(struct crystalhd_cmd *, crystalhd_ioctl_data *); typedef struct _crystalhd_cmd_tbl { uint32_t cmd_id; diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 3c562f0..58fd91a 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -51,7 +51,7 @@ static int chd_dec_enable_int(struct crystalhd_adp *adp) rc = request_irq(adp->pdev->irq, chd_dec_isr, IRQF_SHARED, adp->name, (void *)adp); if (rc) { - BCMLOG_ERR("Interrupt request failed.. \n"); + BCMLOG_ERR("Interrupt request failed..\n"); pci_disable_msi(adp->pdev); } @@ -112,7 +112,7 @@ static inline int crystalhd_user_data(unsigned long ud, void *dr, int size, int int rc; if (!ud || !dr) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return -EINVAL; } @@ -122,7 +122,7 @@ static inline int crystalhd_user_data(unsigned long ud, void *dr, int size, int rc = copy_from_user(dr, (void *)ud, size); if (rc) { - BCMLOG_ERR("Invalid args for command \n"); + BCMLOG_ERR("Invalid args for command\n"); rc = -EFAULT; } @@ -206,7 +206,7 @@ static int chd_dec_proc_user_data(struct crystalhd_adp *adp, rc = crystalhd_user_data(ua, &io->udata, sizeof(io->udata), set); if (rc) { - BCMLOG_ERR("failed to %s iodata \n", (set ? "set" : "get")); + BCMLOG_ERR("failed to %s iodata\n", (set ? "set" : "get")); return rc; } @@ -308,7 +308,7 @@ static int chd_dec_open(struct inode *in, struct file *fd) sts = crystalhd_user_open(&adp->cmds, &uc); if (sts != BC_STS_SUCCESS) { - BCMLOG_ERR("cmd_user_open - %d \n", sts); + BCMLOG_ERR("cmd_user_open - %d\n", sts); rc = -EBUSY; } @@ -326,7 +326,7 @@ static int chd_dec_close(struct inode *in, struct file *fd) BCMLOG_ENTER; if (!adp) { - BCMLOG_ERR("Invalid adp \n"); + BCMLOG_ERR("Invalid adp\n"); return -EINVAL; } @@ -521,7 +521,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev) sts = crystalhd_delete_cmd_context(&pinfo->cmds); if (sts != BC_STS_SUCCESS) - BCMLOG_ERR("cmd delete :%d \n", sts); + BCMLOG_ERR("cmd delete :%d\n", sts); chd_dec_release_chdev(pinfo); @@ -581,7 +581,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, chd_dec_init_chdev(pinfo); rc = chd_dec_enable_int(pinfo); if (rc) { - BCMLOG_ERR("_enable_int err:%d \n", rc); + BCMLOG_ERR("_enable_int err:%d\n", rc); pci_disable_device(pdev); return -ENODEV; } @@ -601,7 +601,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, sts = crystalhd_setup_cmd_context(&pinfo->cmds, pinfo); if (sts != BC_STS_SUCCESS) { - BCMLOG_ERR("cmd setup :%d \n", sts); + BCMLOG_ERR("cmd setup :%d\n", sts); pci_disable_device(pdev); return -ENODEV; } @@ -675,7 +675,7 @@ int chd_dec_pci_resume(struct pci_dev *pdev) rc = chd_dec_enable_int(adp); if (rc) { - BCMLOG_ERR("_enable_int err:%d \n", rc); + BCMLOG_ERR("_enable_int err:%d\n", rc); pci_disable_device(pdev); return -ENODEV; } @@ -738,13 +738,13 @@ static int __init chd_dec_module_init(void) int rc; chd_set_log_level(NULL, "debug"); - BCMLOG(BCMLOG_DATA, "Loading crystalhd %d.%d.%d \n", + BCMLOG(BCMLOG_DATA, "Loading crystalhd %d.%d.%d\n", crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev); rc = pci_register_driver(&bc_chd_70012_driver); if (rc < 0) - BCMLOG_ERR("Could not find any devices. err:%d \n", rc); + BCMLOG_ERR("Could not find any devices. err:%d\n", rc); return rc; } @@ -752,7 +752,7 @@ module_init(chd_dec_module_init); static void __exit chd_dec_module_cleanup(void) { - BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d \n", + BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d\n", crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev); pci_unregister_driver(&bc_chd_70012_driver); diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h index d338ae9..eee4926 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.h +++ b/drivers/staging/crystalhd/crystalhd_lnx.h @@ -42,11 +42,11 @@ #include <linux/pagemap.h> #include <linux/vmalloc.h> -#include <asm/io.h> +#include <linux/io.h> #include <asm/irq.h> #include <asm/pgtable.h> #include <asm/system.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include "crystalhd_cmds.h" diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c index 73593b0..d134667 100644 --- a/drivers/staging/crystalhd/crystalhd_misc.c +++ b/drivers/staging/crystalhd/crystalhd_misc.c @@ -237,7 +237,7 @@ BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off, if (!adp || !rd_buff || (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } for (ix = 0; ix < dw_cnt; ix++) @@ -265,7 +265,7 @@ BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off, if (!adp || !wr_buff || (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } @@ -293,7 +293,7 @@ BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off, int rc = 0; if (!adp || !val) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } @@ -338,7 +338,7 @@ BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off, int rc = 0; if (!adp || !val) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } @@ -685,7 +685,7 @@ BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0; if (!adp || !ubuff || !ubuff_sz || !dio_hnd) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } /* Compute pages */ @@ -791,7 +791,7 @@ BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, dio->sg_cnt = pci_map_sg(adp->pdev, dio->sg, dio->page_cnt, dio->direction); if (dio->sg_cnt <= 0) { - BCMLOG_ERR("sg map %d-%d \n", dio->sg_cnt, dio->page_cnt); + BCMLOG_ERR("sg map %d-%d\n", dio->sg_cnt, dio->page_cnt); crystalhd_unmap_dio(adp, dio); return BC_STS_ERROR; } @@ -826,7 +826,7 @@ BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, crystalhd_dio_req *dio) int j = 0; if (!adp || !dio) { - BCMLOG_ERR("Invalid arg \n"); + BCMLOG_ERR("Invalid arg\n"); return BC_STS_INV_ARG; } @@ -947,7 +947,7 @@ void crystalhd_destroy_dio_pool(struct crystalhd_adp *adp) adp->fill_byte_pool = NULL; } - BCMLOG(BCMLOG_DBG, "Released dio pool %d \n", count); + BCMLOG(BCMLOG_DBG, "Released dio pool %d\n", count); } /** @@ -973,7 +973,7 @@ int __devinit crystalhd_create_elem_pool(struct crystalhd_adp *adp, for (i = 0; i < pool_size; i++) { temp = kzalloc(sizeof(*temp), GFP_KERNEL); if (!temp) { - BCMLOG_ERR("kalloc failed \n"); + BCMLOG_ERR("kalloc failed\n"); return -ENOMEM; } crystalhd_free_elem(adp, temp); |