summaryrefslogtreecommitdiff
path: root/drivers/staging/goldfish
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/goldfish')
-rw-r--r--drivers/staging/goldfish/goldfish_audio.c30
-rw-r--r--drivers/staging/goldfish/goldfish_nand.c11
-rw-r--r--drivers/staging/goldfish/goldfish_nand_reg.h35
3 files changed, 44 insertions, 32 deletions
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index d3bed21f..f96dcec 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -1,4 +1,5 @@
-/* drivers/misc/goldfish_audio.c
+/*
+ * drivers/misc/goldfish_audio.c
*
* Copyright (C) 2007 Google, Inc.
* Copyright (C) 2012 Intel, Inc.
@@ -47,10 +48,11 @@ struct goldfish_audio {
int read_supported; /* true if we have audio input support */
};
-/* We will allocate two read buffers and two write buffers.
- Having two read buffers facilitate stereo -> mono conversion.
- Having two write buffers facilitate interleaved IO.
-*/
+/*
+ * We will allocate two read buffers and two write buffers.
+ * Having two read buffers facilitate stereo -> mono conversion.
+ * Having two write buffers facilitate interleaved IO.
+ */
#define READ_BUFFER_SIZE 16384
#define WRITE_BUFFER_SIZE 16384
#define COMBINED_BUFFER_SIZE ((2 * READ_BUFFER_SIZE) + \
@@ -59,8 +61,10 @@ struct goldfish_audio {
#define AUDIO_READ(data, addr) (readl(data->reg_base + addr))
#define AUDIO_WRITE(data, addr, x) (writel(x, data->reg_base + addr))
-/* temporary variable used between goldfish_audio_probe() and
- goldfish_audio_open() */
+/*
+ * temporary variable used between goldfish_audio_probe() and
+ * goldfish_audio_open()
+ */
static struct goldfish_audio *audio_data;
enum {
@@ -161,8 +165,10 @@ static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf,
}
spin_lock_irqsave(&data->lock, irq_flags);
- /* clear the buffer empty flag, and signal the emulator
- * to start writing the buffer */
+ /*
+ * clear the buffer empty flag, and signal the emulator
+ * to start writing the buffer
+ */
if (kbuf == data->write_buffer1) {
data->buffer_status &= ~AUDIO_INT_WRITE_BUFFER_1_EMPTY;
AUDIO_WRITE(data, AUDIO_WRITE_BUFFER_1, copy);
@@ -225,8 +231,10 @@ static irqreturn_t goldfish_audio_interrupt(int irq, void *dev_id)
/* read buffer status flags */
status = AUDIO_READ(data, AUDIO_INT_STATUS);
status &= AUDIO_INT_MASK;
- /* if buffers are newly empty, wake up blocked
- goldfish_audio_write() call */
+ /*
+ * if buffers are newly empty, wake up blocked
+ * goldfish_audio_write() call
+ */
if (status) {
data->buffer_status = status;
wake_up(&data->wait);
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index ab1f019..81e2ad4 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -326,9 +326,10 @@ static int goldfish_nand_init_device(struct platform_device *pdev,
(mtd->writesize + mtd->oobsize) * mtd->writesize;
do_div(mtd->size, mtd->writesize + mtd->oobsize);
mtd->size *= mtd->writesize;
- dev_dbg(&pdev->dev,
+ dev_dbg(&pdev->dev,
"goldfish nand dev%d: size %llx, page %d, extra %d, erase %d\n",
- id, mtd->size, mtd->writesize, mtd->oobsize, mtd->erasesize);
+ id, mtd->size, mtd->writesize,
+ mtd->oobsize, mtd->erasesize);
spin_unlock_irqrestore(&nand->lock, irq_flags);
mtd->priv = nand;
@@ -340,7 +341,7 @@ static int goldfish_nand_init_device(struct platform_device *pdev,
result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len,
name);
if (result != name_len) {
- dev_err(&pdev->dev,
+ dev_err(&pdev->dev,
"goldfish_nand_init_device failed to get dev name %d != %d\n",
result, name_len);
return -ENODEV;
@@ -391,7 +392,7 @@ static int goldfish_nand_probe(struct platform_device *pdev)
version = readl(base + NAND_VERSION);
if (version != NAND_VERSION_CURRENT) {
- dev_err(&pdev->dev,
+ dev_err(&pdev->dev,
"goldfish_nand_init: version mismatch, got %d, expected %d\n",
version, NAND_VERSION_CURRENT);
return -ENODEV;
@@ -400,7 +401,7 @@ static int goldfish_nand_probe(struct platform_device *pdev)
if (num_dev == 0)
return -ENODEV;
- nand = devm_kzalloc(&pdev->dev, sizeof(*nand) +
+ nand = devm_kzalloc(&pdev->dev, sizeof(*nand) +
sizeof(struct mtd_info) * num_dev, GFP_KERNEL);
if (nand == NULL)
return -ENOMEM;
diff --git a/drivers/staging/goldfish/goldfish_nand_reg.h b/drivers/staging/goldfish/goldfish_nand_reg.h
index 956c6c3..ddfda71 100644
--- a/drivers/staging/goldfish/goldfish_nand_reg.h
+++ b/drivers/staging/goldfish/goldfish_nand_reg.h
@@ -1,27 +1,30 @@
-/* drivers/mtd/devices/goldfish_nand_reg.h
-**
-** Copyright (C) 2007 Google, Inc.
-**
-** This software is licensed under the terms of the GNU General Public
-** License version 2, as published by the Free Software Foundation, and
-** may be copied, distributed, and modified under those terms.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-*/
+/*
+ * drivers/mtd/devices/goldfish_nand_reg.h
+ *
+ * Copyright (C) 2007 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
#ifndef GOLDFISH_NAND_REG_H
#define GOLDFISH_NAND_REG_H
enum nand_cmd {
- NAND_CMD_GET_DEV_NAME, /* Write device name for NAND_DEV to NAND_DATA (vaddr) */
+ /* Write device name for NAND_DEV to NAND_DATA (vaddr) */
+ NAND_CMD_GET_DEV_NAME,
NAND_CMD_READ,
NAND_CMD_WRITE,
NAND_CMD_ERASE,
- NAND_CMD_BLOCK_BAD_GET, /* NAND_RESULT is 1 if block is bad, 0 if it is not */
+ /* NAND_RESULT is 1 if block is bad, 0 if it is not */
+ NAND_CMD_BLOCK_BAD_GET,
NAND_CMD_BLOCK_BAD_SET,
NAND_CMD_READ_WITH_PARAMS,
NAND_CMD_WRITE_WITH_PARAMS,