From patchwork Thu Oct 13 16:33:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9375529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BC5060487 for ; Thu, 13 Oct 2016 17:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E6672A17D for ; Thu, 13 Oct 2016 17:27:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62C8E2A181; Thu, 13 Oct 2016 17:27:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EA132A17D for ; Thu, 13 Oct 2016 17:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934211AbcJMR1E (ORCPT ); Thu, 13 Oct 2016 13:27:04 -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 Received: from [192.168.1.2] ([77.182.72.22]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LkPmd-1bIMzD13lb-00cNNo; Thu, 13 Oct 2016 18:33:04 +0200 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> 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }