mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
fthd: Code style cleanups
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
This commit is contained in:
@@ -84,9 +84,9 @@ static ssize_t fthd_store_debug(struct file *file, const char __user *user_buf,
|
||||
opcode = CISP_CMD_DEBUG_GET_FSM_DEBUG_LEVEL;
|
||||
else if (sscanf(buf, "set_fsm_debug_level %x", &cmd.arg[0]) == 2)
|
||||
opcode = CISP_CMD_DEBUG_SET_FSM_DEBUG_LEVEL;
|
||||
|
||||
else if (sscanf(buf, "%i %i\n", &opcode, &cmd.arg[0]) != 2)
|
||||
return -EINVAL;
|
||||
|
||||
cmd.show_errors = 1;
|
||||
|
||||
ret = fthd_isp_debug_cmd(dev_priv, opcode, &cmd, sizeof(cmd), NULL);
|
||||
@@ -104,7 +104,7 @@ static int seq_channel_read(struct seq_file *seq, struct fthd_private *dev_priv,
|
||||
u32 entry;
|
||||
|
||||
spin_lock_irq(&chan->lock);
|
||||
for( i = 0; i < chan->size; i++) {
|
||||
for (i = 0; i < chan->size; i++) {
|
||||
if (chan->ringbuf.idx == i)
|
||||
pos = '*';
|
||||
else
|
||||
|
||||
@@ -320,7 +320,7 @@ static int fthd_pci_set_dma_mask(struct fthd_private *dev_priv,
|
||||
|
||||
static void fthd_stop_firmware(struct fthd_private *dev_priv)
|
||||
{
|
||||
fthd_isp_cmd_stop(dev_priv);
|
||||
fthd_isp_cmd_stop(dev_priv);
|
||||
isp_powerdown(dev_priv);
|
||||
}
|
||||
|
||||
@@ -369,7 +369,6 @@ static int fthd_pci_init(struct fthd_private *dev_priv)
|
||||
struct pci_dev *pdev = dev_priv->pdev;
|
||||
int ret;
|
||||
|
||||
|
||||
ret = pci_enable_device(pdev);
|
||||
if (ret) {
|
||||
pr_err("Failed to enable device\n");
|
||||
@@ -438,7 +437,6 @@ static int fthd_firmware_start(struct fthd_private *dev_priv)
|
||||
return ret;
|
||||
|
||||
return fthd_isp_cmd_set_loadfile(dev_priv);
|
||||
|
||||
}
|
||||
|
||||
static int fthd_pci_probe(struct pci_dev *pdev,
|
||||
@@ -492,6 +490,7 @@ static int fthd_pci_probe(struct pci_dev *pdev,
|
||||
if (ret)
|
||||
goto fail_v4l2;
|
||||
return 0;
|
||||
|
||||
fail_v4l2:
|
||||
fthd_v4l2_unregister(dev_priv);
|
||||
fail_firmware:
|
||||
|
||||
@@ -158,7 +158,6 @@ static int fthd_hw_s2_pll_init(struct fthd_private *dev_priv, u32 ddr_speed)
|
||||
/* Ref clk 24 */
|
||||
FTHD_S2_REG_WRITE(0x04b00000, S2_PLL_CTRL_20);
|
||||
FTHD_S2_REG_WRITE(0x14280904, S2_PLL_CTRL_24);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ static int fthd_buffer_prepare(struct vb2_buffer *vb)
|
||||
ctx->plane[i] =
|
||||
fthd_iommu_alloc_sgtable(dev_priv, sgtable);
|
||||
|
||||
if(!ctx->plane[i])
|
||||
if (!ctx->plane[i])
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
@@ -279,7 +279,7 @@ static void fthd_stop_streaming(struct vb2_queue *vq)
|
||||
pr_debug("done\n");
|
||||
} else {
|
||||
/* Firmware doesn't respond. */
|
||||
for (i = 0; i < FTHD_NUM_BUFS;i++) {
|
||||
for (i = 0; i < FTHD_NUM_BUFS; i++) {
|
||||
ctx = dev_priv->h2t_bufs + i;
|
||||
if (ctx->state == BUF_DRV_QUEUED ||
|
||||
ctx->state == BUF_HW_QUEUED) {
|
||||
|
||||
Reference in New Issue
Block a user