From patchwork Mon Dec 11 21:42:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10105827 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 E257860751 for ; Mon, 11 Dec 2017 21:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFF0C298F9 for ; Mon, 11 Dec 2017 21:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4D9029919; Mon, 11 Dec 2017 21:42:38 +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, UNPARSEABLE_RELAY 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 5BB91298F9 for ; Mon, 11 Dec 2017 21:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbdLKVmh (ORCPT ); Mon, 11 Dec 2017 16:42:37 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:41764 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbdLKVmf (ORCPT ); Mon, 11 Dec 2017 16:42:35 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990793AbdLKVme0cSGp (ORCPT ); Mon, 11 Dec 2017 22:42:34 +0100 Date: Mon, 11 Dec 2017 22:42:33 +0100 From: Ladislav Michl To: linux-fbdev@vger.kernel.org Cc: Bernie Thompson , Bartlomiej Zolnierkiewicz Subject: [PATCH 5/6] video: udlfb: Remove redundant gdev variable Message-ID: <20171211214233.GF29173@lenoch> References: <20171211213948.GA29173@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171211213948.GA29173@lenoch> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gdev is not really needed as the same content can be read from udev->dev. Signed-off-by: Ladislav Michl --- drivers/video/fbdev/udlfb.c | 4 +--- include/video/udlfb.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 3d757b10a73c..2b22b09e5c3c 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1601,7 +1601,6 @@ static int dlfb_usb_probe(struct usb_interface *interface, kref_init(&dlfb->kref); /* matching kref_put in usb .disconnect fn */ dlfb->udev = usbdev; - dlfb->gdev = &usbdev->dev; /* our generic struct device * */ usb_set_intfdata(interface, dlfb); pr_info("%s %s - serial #%s\n", @@ -1665,7 +1664,7 @@ static void dlfb_init_framebuffer_work(struct work_struct *work) int i; /* allocates framebuffer driver structure, not framebuffer memory */ - info = framebuffer_alloc(0, dlfb->gdev); + info = framebuffer_alloc(0, &dlfb->udev->dev); if (!info) goto error; @@ -1755,7 +1754,6 @@ static void dlfb_usb_disconnect(struct usb_interface *interface) usb_set_intfdata(interface, NULL); dlfb->udev = NULL; - dlfb->gdev = NULL; /* if clients still have us open, will be freed on last close */ if (dlfb->fb_count == 0) diff --git a/include/video/udlfb.h b/include/video/udlfb.h index 7310224acb7f..0cabe6b09095 100644 --- a/include/video/udlfb.h +++ b/include/video/udlfb.h @@ -35,7 +35,6 @@ struct urb_list { struct dlfb_data { struct usb_device *udev; - struct device *gdev; /* &udev->dev */ struct fb_info *info; struct urb_list urbs; struct kref kref;