summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2018-04-30 17:11:33 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2018-05-02 18:48:37 +0000
commitcd38dbb03d71dcde7c0e073f224d7262e265bec3 (patch)
tree410930f05114b6b4e406f794b52b02e14f5eb2c6
parent6b1151702d398f039aa0b966bcb9992354473689 (diff)
goldfish: pipe: ANDROID: fix checkpatch warnings
Bug: 72717639 bug: 66884503 Change-Id: I83ddd1c2da24a2658d8fe1e43718aa6e9fc47d5d Signed-off-by: Roman Kiryanov <rkir@google.com>
-rw-r--r--drivers/platform/goldfish/goldfish_pipe_v2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c
index 64b463e0e6b3..5fd3c239444c 100644
--- a/drivers/platform/goldfish/goldfish_pipe_v2.c
+++ b/drivers/platform/goldfish/goldfish_pipe_v2.c
@@ -370,11 +370,12 @@ static int transfer_max_buffers(struct goldfish_pipe *pipe,
static int wait_for_host_signal(struct goldfish_pipe *pipe, int is_write)
{
u32 wakeBit = is_write ? BIT_WAKE_ON_WRITE : BIT_WAKE_ON_READ;
+ u32 cmdBit = is_write ? PIPE_CMD_WAKE_ON_WRITE : PIPE_CMD_WAKE_ON_READ;
+
set_bit(wakeBit, &pipe->flags);
/* Tell the emulator we're going to wait for a wake event */
- goldfish_pipe_cmd(pipe,
- is_write ? PIPE_CMD_WAKE_ON_WRITE : PIPE_CMD_WAKE_ON_READ);
+ goldfish_pipe_cmd(pipe, cmdBit);
while (test_bit(wakeBit, &pipe->flags)) {
if (wait_event_interruptible(
@@ -789,9 +790,12 @@ static struct miscdevice goldfish_pipe_miscdev = {
static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
{
- char *page;
struct goldfish_pipe_dev *dev = &goldfish_pipe_dev;
- int err = devm_request_irq(&pdev->dev, dev->irq, goldfish_pipe_interrupt,
+ struct device *pdev_dev = &pdev->dev;
+ char *page;
+ int err;
+
+ err = devm_request_irq(pdev_dev, dev->irq, goldfish_pipe_interrupt,
IRQF_SHARED, "goldfish_pipe", dev);
if (err) {
dev_err(&pdev->dev, "unable to allocate IRQ for v2\n");