From 322bace5fb422fb4f8f22a119856877a3ad6c78e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 21 Jun 2010 12:11:23 +0200 Subject: usbnet: remove unused dev member in struct usbnet Signed-off-by: Sascha Hauer --- include/usb/usbnet.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/usb/usbnet.h b/include/usb/usbnet.h index 77f19603c2..e3ea373d95 100644 --- a/include/usb/usbnet.h +++ b/include/usb/usbnet.h @@ -54,8 +54,6 @@ struct usbnet { # define EVENT_RX_MEMORY 2 # define EVENT_STS_SPLIT 3 # define EVENT_LINK_RESET 4 - /* FIXME: Our eth_device should have this, not us! */ - struct device_d dev; }; #if 0 -- cgit v1.2.3 From 112d65d3d2bde37529e61d6ad3011c39a1f65589 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 22 Jun 2010 16:26:35 +0200 Subject: fb: add a usage counter to prevent double enable/disable Signed-off-by: Sascha Hauer --- drivers/video/fb.c | 5 +++++ include/fb.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/drivers/video/fb.c b/drivers/video/fb.c index 841c3afe9e..f9a425efac 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -39,6 +39,9 @@ static int fb_enable_set(struct device_d *dev, struct param_d *param, enable = simple_strtoul(val, NULL, 0); + if (info->enabled == !!enable) + return 0; + if (enable) { info->fbops->fb_enable(info); new = "1"; @@ -49,6 +52,8 @@ static int fb_enable_set(struct device_d *dev, struct param_d *param, dev_param_set_generic(dev, param, new); + info->enabled = !!enable; + return 0; } diff --git a/include/fb.h b/include/fb.h index 218500b985..379f931e9c 100644 --- a/include/fb.h +++ b/include/fb.h @@ -96,7 +96,9 @@ struct fb_info { struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; - struct fb_bitfield transp; /* transparency */ + struct fb_bitfield transp; /* transparency */ + + int enabled; }; int register_framebuffer(struct fb_info *info); -- cgit v1.2.3