diff options
author | Chihau Chau <chihau@gmail.com> | 2010-02-25 17:57:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 10:59:02 -0500 |
commit | df84f941e9370be6798fa11aa5a77396d8869fdc (patch) | |
tree | bf9390507b976b633293c828eaf537d070ba85aa /drivers | |
parent | 3f4b4e779714ae2dd55757617a8033ab338fa7f0 (diff) |
Staging: dream: camera: msm_camera: fix code style issues
This fixes some code style issues like to add one space after a while or
switch statement and before a open parenthesis '(', and to include KERN_
facility level in the printk() functions.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/dream/camera/msm_camera.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 925e16c324d2..223918f858e7 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c | |||
@@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors); | |||
76 | list_del_init(&qcmd->list); \ | 76 | list_del_init(&qcmd->list); \ |
77 | kfree(qcmd); \ | 77 | kfree(qcmd); \ |
78 | }; \ | 78 | }; \ |
79 | } while(0) | 79 | } while (0) |
80 | 80 | ||
81 | #define MSM_DRAIN_QUEUE(sync, name) do { \ | 81 | #define MSM_DRAIN_QUEUE(sync, name) do { \ |
82 | unsigned long flags; \ | 82 | unsigned long flags; \ |
83 | spin_lock_irqsave(&(sync)->name##_lock, flags); \ | 83 | spin_lock_irqsave(&(sync)->name##_lock, flags); \ |
84 | MSM_DRAIN_QUEUE_NOSYNC(sync, name); \ | 84 | MSM_DRAIN_QUEUE_NOSYNC(sync, name); \ |
85 | spin_unlock_irqrestore(&(sync)->name##_lock, flags); \ | 85 | spin_unlock_irqrestore(&(sync)->name##_lock, flags); \ |
86 | } while(0) | 86 | } while (0) |
87 | 87 | ||
88 | static int check_overlap(struct hlist_head *ptype, | 88 | static int check_overlap(struct hlist_head *ptype, |
89 | unsigned long paddr, | 89 | unsigned long paddr, |
@@ -868,7 +868,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) | |||
868 | return -EFAULT; | 868 | return -EFAULT; |
869 | } | 869 | } |
870 | 870 | ||
871 | switch(cfgcmd.cmd_type) { | 871 | switch (cfgcmd.cmd_type) { |
872 | case CMD_STATS_ENABLE: | 872 | case CMD_STATS_ENABLE: |
873 | axi_data.bufnum1 = | 873 | axi_data.bufnum1 = |
874 | msm_pmem_region_lookup(&sync->stats, | 874 | msm_pmem_region_lookup(&sync->stats, |
@@ -1621,7 +1621,8 @@ static int msm_release_control(struct inode *node, struct file *filep) | |||
1621 | int rc; | 1621 | int rc; |
1622 | struct msm_control_device *ctrl_pmsm = filep->private_data; | 1622 | struct msm_control_device *ctrl_pmsm = filep->private_data; |
1623 | struct msm_device *pmsm = ctrl_pmsm->pmsm; | 1623 | struct msm_device *pmsm = ctrl_pmsm->pmsm; |
1624 | printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); | 1624 | printk(KERN_INFO "msm_camera: RELEASE %s\n", |
1625 | filep->f_path.dentry->d_name.name); | ||
1625 | rc = __msm_release(pmsm->sync); | 1626 | rc = __msm_release(pmsm->sync); |
1626 | if (!rc) { | 1627 | if (!rc) { |
1627 | MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); | 1628 | MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); |
@@ -1635,7 +1636,8 @@ static int msm_release_frame(struct inode *node, struct file *filep) | |||
1635 | { | 1636 | { |
1636 | int rc; | 1637 | int rc; |
1637 | struct msm_device *pmsm = filep->private_data; | 1638 | struct msm_device *pmsm = filep->private_data; |
1638 | printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); | 1639 | printk(KERN_INFO "msm_camera: RELEASE %s\n", |
1640 | filep->f_path.dentry->d_name.name); | ||
1639 | rc = __msm_release(pmsm->sync); | 1641 | rc = __msm_release(pmsm->sync); |
1640 | if (!rc) { | 1642 | if (!rc) { |
1641 | MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); | 1643 | MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); |
@@ -1719,7 +1721,7 @@ static void msm_vfe_sync(struct msm_vfe_resp *vdata, | |||
1719 | qcmd->type = qtype; | 1721 | qcmd->type = qtype; |
1720 | 1722 | ||
1721 | if (qtype == MSM_CAM_Q_VFE_MSG) { | 1723 | if (qtype == MSM_CAM_Q_VFE_MSG) { |
1722 | switch(vdata->type) { | 1724 | switch (vdata->type) { |
1723 | case VFE_MSG_OUTPUT1: | 1725 | case VFE_MSG_OUTPUT1: |
1724 | case VFE_MSG_OUTPUT2: | 1726 | case VFE_MSG_OUTPUT2: |
1725 | qcmd_frame = | 1727 | qcmd_frame = |
@@ -1928,7 +1930,8 @@ static int __msm_v4l2_control(struct msm_sync *sync, | |||
1928 | memcpy(out->value, ctrl->value, ctrl->length); | 1930 | memcpy(out->value, ctrl->value, ctrl->length); |
1929 | 1931 | ||
1930 | end: | 1932 | end: |
1931 | if (rcmd) kfree(rcmd); | 1933 | if (rcmd) |
1934 | kfree(rcmd); | ||
1932 | CDBG("__msm_v4l2_control: end rc = %d\n", rc); | 1935 | CDBG("__msm_v4l2_control: end rc = %d\n", rc); |
1933 | return rc; | 1936 | return rc; |
1934 | } | 1937 | } |