Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934244AbcJMR1L (ORCPT ); Thu, 13 Oct 2016 13:27:11 -0400 Received: from mout.web.de ([212.227.15.14]:58808 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932150AbcJMR1C (ORCPT ); Thu, 13 Oct 2016 13:27:02 -0400 Subject: [PATCH 11/18] [media] RedRat3: Delete the variable "dev" in redrat3_init_rc_dev() To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <8eee44d9-d8c3-c495-b3b0-0b5adfda71d5@users.sourceforge.net> Date: Thu, 13 Oct 2016 18:33:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:cxQnl4bnZeu675g/iux1DTCj44Erfy6GRoiwgdjYdA3A8NvjRJK OPasDlnQKlUGM7J1Q5vffPjGhiY+DFTb3/ivPAQORXzxjyXbdhB13kohFVWs9ccQHDJPYOc gdkRQibGj062KW7ATxVgwJJgolZhQKIWt2TEQ1dnKx4qRMj4nPk0kUJcQWhZIgmB0/IlYU7 gOjA0hULXwfz5ondJ8b/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:hKZ/9rUC5Lw=:1pdKQ7qpzXkvjW2kshxOlk k2AP3GMJ2upSlq7ccEsyrCsThcsTTTw4ifNHmWyGOfB0wCwaVYK/+bpUtglwD+WcPxAVzk6Nb V4YmkNCLOiL7sUTWBTuKQVUhdUeYhlb71XKC+8yx0L0WwtdBldE55cFkpt+3H0qoXQCozWWCh fO3+krDjuRN9zX9ICVOvKN9hSShp8AviMmlgMp+Z+ukpQh7RndLUXfqnVqPB05yrepx3ACqyM ibvret6mMVPqTOZTynkcbv6PayzATH87ahBwyb7FrDu6D82U0Lo2iLcq21ctE34Q3dNZ/k2Vu abxbnzHZ1Qs8/iWZAXs24ffBWGjm6ze4yI6wn5n0WyVmgx8Fr5VYIKX9aA1g+2LaWubod35Ga ib8THH4rPL2Gc8lqUzokfRJceqBHDA7F/HGBbo3zqcHvuu8VfndXX8bn3bMZjSRktdOucZZb0 18tOutGQnmwmZgehMvPuzVOHEsAsjuIhfmZzUX1NBtwVH/pg7cZSDAKAFX9rppdsxwZwcOUCb skSY2lCvAkNoiKVhRSLtFdFtPqYKVe2d8S7ik0cj+Ip0duM66IqSwt0THhUwlgJwpHLzByA0u OQnvpsL0Lf3JqB7jq+4Ylt+1Q7h55Y1jDDpZTHbJZQpRo0n9U2v5+D6/oFA6kgYlWjrOuDZhh +ERWnIG4Z6ZLcls04XBTdq9xFCmeLJqOTL9JFuxXgolaH99BjK2f++KVoOhpgBnshll6nEXUm GIRbyQ7CZAZuAl+0u6QtemKKKK+2xzrKQMcg1Jd5zkG1rwcaemR+wLDNEUEobfo5xZk48O39f VNOVr// Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1452 Lines: 44 From: Markus Elfring Date: Thu, 13 Oct 2016 14:40:11 +0200 Use the data structure member "dev" directly without assigning it to an intermediate variable. Thus delete the extra variable definition at the beginning. Signed-off-by: Markus Elfring --- drivers/media/rc/redrat3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index c43f43b..b23a8bb 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -854,7 +854,6 @@ static void redrat3_led_complete(struct urb *urb) static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) { - struct device *dev = rr3->dev; struct rc_dev *rc; int ret; u16 prod = le16_to_cpu(rr3->udev->descriptor.idProduct); @@ -873,7 +872,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) rc->input_name = rr3->name; rc->input_phys = rr3->phys; usb_to_input_id(rr3->udev, &rc->input_id); - rc->dev.parent = dev; + rc->dev.parent = rr3->dev; rc->priv = rr3; rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL; @@ -889,7 +888,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) ret = rc_register_device(rc); if (ret < 0) { - dev_err(dev, "remote dev registration failed\n"); + dev_err(rr3->dev, "remote dev registration failed\n"); goto out; } -- 2.10.1