summaryrefslogtreecommitdiff
path: root/drivers/platform/goldfish/goldfish_pipe.c
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2018-04-30 14:19:57 -0700
committerRoman Kiryanov <rkir@google.com>2018-05-01 12:11:49 -0700
commit9846d12d4819a42f27f5ab5fc92cc07afb331f9e (patch)
tree651563f213d659ad8548aea1a77be215d54d62d6 /drivers/platform/goldfish/goldfish_pipe.c
parentd176c57751903809f81c9021f4d45eb9c907e605 (diff)
goldfish: pipe: ANDROID: rename global variables
We don't need an array of 1 for pipe_dev and use better names to distinguish between goldfish_pipe_dev and miscdevice. Bug: 72717639 Bug: 66884503 Change-Id: Iab040c158745f034ca8e9569fd49c84933b1c4ba Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'drivers/platform/goldfish/goldfish_pipe.c')
-rw-r--r--drivers/platform/goldfish/goldfish_pipe.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index dc376b0fd276..df3f5c301a61 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -506,7 +506,7 @@ static irqreturn_t goldfish_pipe_interrupt(int irq, void *dev_id)
static int goldfish_pipe_open(struct inode *inode, struct file *file)
{
struct goldfish_pipe *pipe;
- struct goldfish_pipe_dev *dev = pipe_dev;
+ struct goldfish_pipe_dev *dev = &goldfish_pipe_dev;
int32_t status;
/* Allocate new pipe kernel object */
@@ -558,7 +558,7 @@ static const struct file_operations goldfish_pipe_fops = {
.release = goldfish_pipe_release,
};
-static struct miscdevice goldfish_pipe_dev = {
+static struct miscdevice goldfish_pipe_miscdev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "goldfish_pipe",
.fops = &goldfish_pipe_fops,
@@ -566,15 +566,16 @@ static struct miscdevice goldfish_pipe_dev = {
int goldfish_pipe_device_init_v1(struct platform_device *pdev)
{
- struct goldfish_pipe_dev *dev = pipe_dev;
+ struct goldfish_pipe_dev *dev = &goldfish_pipe_dev;
int 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 v1\n");
return err;
}
- err = misc_register(&goldfish_pipe_dev);
+ err = misc_register(&goldfish_pipe_miscdev);
if (err) {
dev_err(&pdev->dev, "unable to register v1 device\n");
return err;
@@ -586,5 +587,5 @@ int goldfish_pipe_device_init_v1(struct platform_device *pdev)
void goldfish_pipe_device_deinit_v1(struct platform_device *pdev)
{
- misc_deregister(&goldfish_pipe_dev);
+ misc_deregister(&goldfish_pipe_miscdev);
}