Skip to content

Commit

Permalink
video: udlfb: Remove redundant gdev variable
Browse files Browse the repository at this point in the history
gdev is not really needed as the same content can be read
from udev->dev.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  • Loading branch information
Ladislav Michl authored and Bartlomiej Zolnierkiewicz committed Jan 15, 2018
1 parent acea8d5 commit 84df649
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions drivers/video/fbdev/udlfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion include/video/udlfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84df649

Please sign in to comment.