video: udlfb: Remove redundant gdev variable

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/84df64956bf4d71a831a4cac5fca5b1985eba654
Commit:     84df64956bf4d71a831a4cac5fca5b1985eba654
Parent:     acea8d5fd83177c4dfd9316d055e076960121abe
Refname:    refs/heads/master
Author:     Ladislav Michl <[email protected]>
AuthorDate: Mon Jan 15 17:04:21 2018 +0100
Committer:  Bartlomiej Zolnierkiewicz <[email protected]>
CommitDate: Mon Jan 15 17:04:21 2018 +0100

    video: udlfb: Remove redundant gdev variable
    
    gdev is not really needed as the same content can be read
    from udev->dev.
    
    Signed-off-by: Ladislav Michl <[email protected]>
    Cc: Bernie Thompson <[email protected]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
 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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.