From patchwork Thu Jan 4 19:37:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10145583 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 B2B3A6034B for ; Thu, 4 Jan 2018 19:37:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A229826256 for ; Thu, 4 Jan 2018 19:37:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96ED128844; Thu, 4 Jan 2018 19:37:55 +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 20F5A28833 for ; Thu, 4 Jan 2018 19:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbeADThy (ORCPT ); Thu, 4 Jan 2018 14:37:54 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:53456 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbeADThx (ORCPT ); Thu, 4 Jan 2018 14:37:53 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990754AbeADThwYCy7x (ORCPT ); Thu, 4 Jan 2018 20:37:52 +0100 Date: Thu, 4 Jan 2018 20:37:51 +0100 From: Ladislav Michl To: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org, Bernie Thompson Subject: [PATCH v2 2/5] video: udlfb: Remove redundant gdev variable Message-ID: <20180104193751.GC22612@lenoch> References: <20180104193623.GA22612@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180104193623.GA22612@lenoch> User-Agent: Mutt/1.9.2 (2017-12-15) 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 --- Changes: - v2: None (just made patch #2) 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 5f68f8c720ec..d4e15d97a264 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1605,7 +1605,6 @@ static int dlfb_usb_probe(struct usb_interface *interface, kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ dev->udev = usbdev; - dev->gdev = &usbdev->dev; /* our generic struct device * */ usb_set_intfdata(interface, dev); pr_info("%s %s - serial #%s\n", @@ -1670,7 +1669,7 @@ static void dlfb_init_framebuffer_work(struct work_struct *work) int i; /* allocates framebuffer driver structure, not framebuffer memory */ - info = framebuffer_alloc(0, dev->gdev); + info = framebuffer_alloc(0, &dev->udev->dev); if (!info) { pr_err("framebuffer_alloc failed\n"); goto error; @@ -1765,7 +1764,6 @@ static void dlfb_usb_disconnect(struct usb_interface *interface) usb_set_intfdata(interface, NULL); dev->udev = NULL; - dev->gdev = NULL; /* if clients still have us open, will be freed on last close */ if (dev->fb_count == 0) diff --git a/include/video/udlfb.h b/include/video/udlfb.h index 1252a7a89bc0..7b4f567dd1fe 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;