Commit 8f52e264 authored by Loic Pefferkorn's avatar Loic Pefferkorn Committed by Greg Kroah-Hartman

staging: goldfish: fix alignment to match open parenthesis

Coding style: fix alignment to match open parenthesis
Signed-off-by: default avatarLoic Pefferkorn <loic@loicp.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b61f085
...@@ -112,7 +112,7 @@ enum { ...@@ -112,7 +112,7 @@ enum {
static atomic_t open_count = ATOMIC_INIT(0); static atomic_t open_count = ATOMIC_INIT(0);
static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, static ssize_t goldfish_audio_read(struct file *fp, char __user *buf,
size_t count, loff_t *pos) size_t count, loff_t *pos)
{ {
struct goldfish_audio *data = fp->private_data; struct goldfish_audio *data = fp->private_data;
int length; int length;
...@@ -125,11 +125,10 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, ...@@ -125,11 +125,10 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf,
length = (count > READ_BUFFER_SIZE ? READ_BUFFER_SIZE : count); length = (count > READ_BUFFER_SIZE ? READ_BUFFER_SIZE : count);
AUDIO_WRITE(data, AUDIO_START_READ, length); AUDIO_WRITE(data, AUDIO_START_READ, length);
wait_event_interruptible(data->wait, wait_event_interruptible(data->wait, (data->buffer_status &
(data->buffer_status & AUDIO_INT_READ_BUFFER_FULL)); AUDIO_INT_READ_BUFFER_FULL));
length = AUDIO_READ(data, length = AUDIO_READ(data, AUDIO_READ_BUFFER_AVAILABLE);
AUDIO_READ_BUFFER_AVAILABLE);
/* copy data to user space */ /* copy data to user space */
if (copy_to_user(buf, data->read_buffer, length)) if (copy_to_user(buf, data->read_buffer, length))
...@@ -143,7 +142,7 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf, ...@@ -143,7 +142,7 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf,
} }
static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf, static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf,
size_t count, loff_t *pos) size_t count, loff_t *pos)
{ {
struct goldfish_audio *data = fp->private_data; struct goldfish_audio *data = fp->private_data;
unsigned long irq_flags; unsigned long irq_flags;
...@@ -217,7 +216,7 @@ static int goldfish_audio_release(struct inode *ip, struct file *fp) ...@@ -217,7 +216,7 @@ static int goldfish_audio_release(struct inode *ip, struct file *fp)
} }
static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd, static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd,
unsigned long arg) unsigned long arg)
{ {
/* temporary workaround, until we switch to the ALSA API */ /* temporary workaround, until we switch to the ALSA API */
if (cmd == 315) if (cmd == 315)
...@@ -306,7 +305,7 @@ static int goldfish_audio_probe(struct platform_device *pdev) ...@@ -306,7 +305,7 @@ static int goldfish_audio_probe(struct platform_device *pdev)
data->read_buffer = data->buffer_virt + 2 * WRITE_BUFFER_SIZE; data->read_buffer = data->buffer_virt + 2 * WRITE_BUFFER_SIZE;
ret = devm_request_irq(&pdev->dev, data->irq, goldfish_audio_interrupt, ret = devm_request_irq(&pdev->dev, data->irq, goldfish_audio_interrupt,
IRQF_SHARED, pdev->name, data); IRQF_SHARED, pdev->name, data);
if (ret) { if (ret) {
dev_err(&pdev->dev, "request_irq failed\n"); dev_err(&pdev->dev, "request_irq failed\n");
return ret; return ret;
...@@ -321,18 +320,18 @@ static int goldfish_audio_probe(struct platform_device *pdev) ...@@ -321,18 +320,18 @@ static int goldfish_audio_probe(struct platform_device *pdev)
} }
AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_1, AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_1,
AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr); AUDIO_SET_WRITE_BUFFER_1_HIGH, buf_addr);
buf_addr += WRITE_BUFFER_SIZE; buf_addr += WRITE_BUFFER_SIZE;
AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_2, AUDIO_WRITE64(data, AUDIO_SET_WRITE_BUFFER_2,
AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr); AUDIO_SET_WRITE_BUFFER_2_HIGH, buf_addr);
buf_addr += WRITE_BUFFER_SIZE; buf_addr += WRITE_BUFFER_SIZE;
data->read_supported = AUDIO_READ(data, AUDIO_READ_SUPPORTED); data->read_supported = AUDIO_READ(data, AUDIO_READ_SUPPORTED);
if (data->read_supported) if (data->read_supported)
AUDIO_WRITE64(data, AUDIO_SET_READ_BUFFER, AUDIO_WRITE64(data, AUDIO_SET_READ_BUFFER,
AUDIO_SET_READ_BUFFER_HIGH, buf_addr); AUDIO_SET_READ_BUFFER_HIGH, buf_addr);
audio_data = data; audio_data = data;
return 0; return 0;
......
...@@ -39,8 +39,8 @@ struct goldfish_nand { ...@@ -39,8 +39,8 @@ struct goldfish_nand {
}; };
static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd,
enum nand_cmd cmd, u64 addr, u32 len, enum nand_cmd cmd, u64 addr, u32 len,
void *ptr, u32 *rv) void *ptr, u32 *rv)
{ {
u32 cmdp; u32 cmdp;
struct goldfish_nand *nand = mtd->priv; struct goldfish_nand *nand = mtd->priv;
...@@ -74,7 +74,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, ...@@ -74,7 +74,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd,
} }
static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd,
u64 addr, u32 len, void *ptr) u64 addr, u32 len, void *ptr)
{ {
struct goldfish_nand *nand = mtd->priv; struct goldfish_nand *nand = mtd->priv;
u32 rv; u32 rv;
...@@ -113,7 +113,7 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -113,7 +113,7 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr)
if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) { if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) {
pr_err("goldfish_nand_erase: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n", pr_err("goldfish_nand_erase: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n",
ofs, len, mtd->size, mtd->erasesize); ofs, len, mtd->size, mtd->erasesize);
return -EIO; return -EIO;
} }
...@@ -124,12 +124,12 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -124,12 +124,12 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr)
invalid_arg: invalid_arg:
pr_err("goldfish_nand_erase: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n", pr_err("goldfish_nand_erase: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n",
ofs, len, mtd->size, mtd->erasesize); ofs, len, mtd->size, mtd->erasesize);
return -EINVAL; return -EINVAL;
} }
static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs,
struct mtd_oob_ops *ops) struct mtd_oob_ops *ops)
{ {
u32 rem; u32 rem;
...@@ -156,12 +156,12 @@ static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, ...@@ -156,12 +156,12 @@ static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs,
invalid_arg: invalid_arg:
pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs, static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs,
struct mtd_oob_ops *ops) struct mtd_oob_ops *ops)
{ {
u32 rem; u32 rem;
...@@ -188,12 +188,12 @@ static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs, ...@@ -188,12 +188,12 @@ static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs,
invalid_arg: invalid_arg:
pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len, static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
u32 rem; u32 rem;
...@@ -210,12 +210,12 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -210,12 +210,12 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
invalid_arg: invalid_arg:
pr_err("goldfish_nand_read: invalid read, start %llx, len %zx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_read: invalid read, start %llx, len %zx, dev_size %llx, write_size %x\n",
from, len, mtd->size, mtd->writesize); from, len, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len, static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf) size_t *retlen, const u_char *buf)
{ {
u32 rem; u32 rem;
...@@ -232,7 +232,7 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -232,7 +232,7 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
invalid_arg: invalid_arg:
pr_err("goldfish_nand_write: invalid write, start %llx, len %zx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_write: invalid write, start %llx, len %zx, dev_size %llx, write_size %x\n",
to, len, mtd->size, mtd->writesize); to, len, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
...@@ -253,7 +253,7 @@ static int goldfish_nand_block_isbad(struct mtd_info *mtd, loff_t ofs) ...@@ -253,7 +253,7 @@ static int goldfish_nand_block_isbad(struct mtd_info *mtd, loff_t ofs)
invalid_arg: invalid_arg:
pr_err("goldfish_nand_block_isbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_block_isbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
ofs, mtd->size, mtd->writesize); ofs, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
...@@ -276,12 +276,12 @@ static int goldfish_nand_block_markbad(struct mtd_info *mtd, loff_t ofs) ...@@ -276,12 +276,12 @@ static int goldfish_nand_block_markbad(struct mtd_info *mtd, loff_t ofs)
invalid_arg: invalid_arg:
pr_err("goldfish_nand_block_markbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n", pr_err("goldfish_nand_block_markbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
ofs, mtd->size, mtd->writesize); ofs, mtd->size, mtd->writesize);
return -EINVAL; return -EINVAL;
} }
static int nand_setup_cmd_params(struct platform_device *pdev, static int nand_setup_cmd_params(struct platform_device *pdev,
struct goldfish_nand *nand) struct goldfish_nand *nand)
{ {
u64 paddr; u64 paddr;
unsigned char __iomem *base = nand->base; unsigned char __iomem *base = nand->base;
...@@ -298,7 +298,7 @@ static int nand_setup_cmd_params(struct platform_device *pdev, ...@@ -298,7 +298,7 @@ static int nand_setup_cmd_params(struct platform_device *pdev,
} }
static int goldfish_nand_init_device(struct platform_device *pdev, static int goldfish_nand_init_device(struct platform_device *pdev,
struct goldfish_nand *nand, int id) struct goldfish_nand *nand, int id)
{ {
u32 name_len; u32 name_len;
u32 result; u32 result;
...@@ -333,7 +333,7 @@ static int goldfish_nand_init_device(struct platform_device *pdev, ...@@ -333,7 +333,7 @@ static int goldfish_nand_init_device(struct platform_device *pdev,
return -ENOMEM; return -ENOMEM;
result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len, result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len,
name); name);
if (result != name_len) { if (result != name_len) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"goldfish_nand_init_device failed to get dev name %d != %d\n", "goldfish_nand_init_device failed to get dev name %d != %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment