Skip to content

Commit

Permalink
platform: goldfish: pipe: Replace pr_ with dev_ for logging
Browse files Browse the repository at this point in the history
dev_ is preferred if struct device is available.

Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Roman Kiryanov authored and gregkh committed Sep 14, 2018
1 parent 869fd50 commit 25b97d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/platform/goldfish/goldfish_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ struct goldfish_pipe_dev {
/* Head of a doubly linked list of signalled pipes */
struct goldfish_pipe *first_signalled_pipe;

/* ptr to platform device's device struct */
struct device *pdev_dev;

/* Some device-specific data */
int irq;
int version;
Expand Down Expand Up @@ -434,7 +437,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
* err.
*/
if (status != PIPE_ERROR_AGAIN)
pr_info_ratelimited("goldfish_pipe: backend error %d on %s\n",
dev_err_ratelimited(pipe->dev->pdev_dev,
"backend error %d on %s\n",
status, is_write ? "write" : "read");
break;
}
Expand Down Expand Up @@ -787,6 +791,7 @@ static int goldfish_pipe_device_init(struct platform_device *pdev)
return err;
}

dev->pdev_dev = &pdev->dev;
dev->first_signalled_pipe = NULL;
dev->pipes_capacity = INITIAL_PIPES_CAPACITY;
dev->pipes = kcalloc(dev->pipes_capacity, sizeof(*dev->pipes),
Expand Down

0 comments on commit 25b97d5

Please sign in to comment.