From f4614145011e6e016690fdc706458ca854a484bb Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 7 Feb 2018 12:51:15 +0200 Subject: [PATCH] libweston: remove restore functionality This was used from the crash handlers, which do not exist anymore. Nothing calls restore, so delete the dead code. Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone --- libweston/compositor-drm.c | 7 ------- libweston/compositor-fbdev.c | 7 ------- libweston/compositor-headless.c | 6 ------ libweston/compositor-rdp.c | 6 ------ libweston/compositor-wayland.c | 6 ------ libweston/compositor-x11.c | 6 ------ libweston/compositor.h | 1 - libweston/launcher-direct.c | 1 - libweston/launcher-impl.h | 1 - libweston/launcher-logind.c | 8 -------- libweston/launcher-util.c | 7 ------- libweston/launcher-util.h | 3 --- libweston/launcher-weston-launch.c | 1 - 13 files changed, 60 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 61c9bf5e..eb8b8ff6 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -5117,12 +5117,6 @@ udev_drm_event(int fd, uint32_t mask, void *data) return 1; } -static void -drm_restore(struct weston_compositor *ec) -{ - weston_launcher_restore(ec->launcher); -} - static void drm_destroy(struct weston_compositor *ec) { @@ -5651,7 +5645,6 @@ drm_backend_create(struct weston_compositor *compositor, } b->base.destroy = drm_destroy; - b->base.restore = drm_restore; b->base.repaint_begin = drm_repaint_begin; b->base.repaint_flush = drm_repaint_flush; b->base.repaint_cancel = drm_repaint_cancel; diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c index fbab634b..c63b1fc1 100644 --- a/libweston/compositor-fbdev.c +++ b/libweston/compositor-fbdev.c @@ -698,12 +698,6 @@ session_notify(struct wl_listener *listener, void *data) } } -static void -fbdev_restore(struct weston_compositor *compositor) -{ - weston_launcher_restore(compositor->launcher); -} - static struct fbdev_backend * fbdev_backend_create(struct weston_compositor *compositor, struct weston_fbdev_backend_config *param) @@ -743,7 +737,6 @@ fbdev_backend_create(struct weston_compositor *compositor, } backend->base.destroy = fbdev_backend_destroy; - backend->base.restore = fbdev_restore; backend->prev_state = WESTON_COMPOSITOR_ACTIVE; diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c index 2f01b64a..9307a36a 100644 --- a/libweston/compositor-headless.c +++ b/libweston/compositor-headless.c @@ -245,11 +245,6 @@ headless_output_create(struct weston_compositor *compositor, return 0; } -static void -headless_restore(struct weston_compositor *ec) -{ -} - static void headless_destroy(struct weston_compositor *ec) { @@ -283,7 +278,6 @@ headless_backend_create(struct weston_compositor *compositor, goto err_free; b->base.destroy = headless_destroy; - b->base.restore = headless_restore; b->use_pixman = config->use_pixman; if (b->use_pixman) { diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c index 98286737..4a4dc696 100644 --- a/libweston/compositor-rdp.c +++ b/libweston/compositor-rdp.c @@ -596,11 +596,6 @@ rdp_backend_create_output(struct weston_compositor *compositor) return 0; } -static void -rdp_restore(struct weston_compositor *ec) -{ -} - static void rdp_destroy(struct weston_compositor *ec) { @@ -1303,7 +1298,6 @@ rdp_backend_create(struct weston_compositor *compositor, b->compositor = compositor; b->base.destroy = rdp_destroy; - b->base.restore = rdp_restore; b->rdp_key = config->rdp_key ? strdup(config->rdp_key) : NULL; b->no_clients_resize = config->no_clients_resize; diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index c5290d85..c6b92611 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -2450,11 +2450,6 @@ wayland_backend_handle_event(int fd, uint32_t mask, void *data) return count; } -static void -wayland_restore(struct weston_compositor *ec) -{ -} - static void wayland_destroy(struct weston_compositor *ec) { @@ -2618,7 +2613,6 @@ wayland_backend_create(struct weston_compositor *compositor, } b->base.destroy = wayland_destroy; - b->base.restore = wayland_restore; loop = wl_display_get_event_loop(compositor->wl_display); diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c index a1d21270..14faeda0 100644 --- a/libweston/compositor-x11.c +++ b/libweston/compositor-x11.c @@ -1742,11 +1742,6 @@ x11_backend_get_wm_info(struct x11_backend *c) free(reply); } -static void -x11_restore(struct weston_compositor *ec) -{ -} - static void x11_destroy(struct weston_compositor *ec) { @@ -1839,7 +1834,6 @@ x11_backend_create(struct weston_compositor *compositor, weston_log("Using %s renderer\n", config->use_pixman ? "pixman" : "gl"); b->base.destroy = x11_destroy; - b->base.restore = x11_restore; if (x11_input_create(b, config->no_input) < 0) { weston_log("Failed to create X11 input\n"); diff --git a/libweston/compositor.h b/libweston/compositor.h index dffcba89..ca1acc60 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -820,7 +820,6 @@ struct weston_backend_config { struct weston_backend { void (*destroy)(struct weston_compositor *compositor); - void (*restore)(struct weston_compositor *compositor); /** Begin a repaint sequence * diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c index b4ca609a..e0ce6d63 100644 --- a/libweston/launcher-direct.c +++ b/libweston/launcher-direct.c @@ -333,6 +333,5 @@ const struct launcher_interface launcher_direct_iface = { .open = launcher_direct_open, .close = launcher_direct_close, .activate_vt = launcher_direct_activate_vt, - .restore = launcher_direct_restore, .get_vt = launcher_direct_get_vt, }; diff --git a/libweston/launcher-impl.h b/libweston/launcher-impl.h index 404383ad..b601baa9 100644 --- a/libweston/launcher-impl.h +++ b/libweston/launcher-impl.h @@ -36,7 +36,6 @@ struct launcher_interface { int (* open) (struct weston_launcher *launcher, const char *path, int flags); void (* close) (struct weston_launcher *launcher, int fd); int (* activate_vt) (struct weston_launcher *launcher, int vt); - void (* restore) (struct weston_launcher *launcher); /* Get the number of the VT weston is running in */ int (* get_vt) (struct weston_launcher *launcher); }; diff --git a/libweston/launcher-logind.c b/libweston/launcher-logind.c index 21d8c37b..d0559c8f 100644 --- a/libweston/launcher-logind.c +++ b/libweston/launcher-logind.c @@ -238,11 +238,6 @@ launcher_logind_close(struct weston_launcher *launcher, int fd) minor(st.st_rdev)); } -static void -launcher_logind_restore(struct weston_launcher *launcher) -{ -} - static int launcher_logind_activate_vt(struct weston_launcher *launcher, int vt) { @@ -382,7 +377,6 @@ static void disconnected_dbus(struct launcher_logind *wl) { weston_log("logind: dbus connection lost, exiting..\n"); - launcher_logind_restore(&wl->base); exit(-1); } @@ -403,7 +397,6 @@ session_removed(struct launcher_logind *wl, DBusMessage *m) if (!strcmp(name, wl->sid)) { weston_log("logind: our session got closed, exiting..\n"); - launcher_logind_restore(&wl->base); exit(-1); } } @@ -852,6 +845,5 @@ const struct launcher_interface launcher_logind_iface = { .open = launcher_logind_open, .close = launcher_logind_close, .activate_vt = launcher_logind_activate_vt, - .restore = launcher_logind_restore, .get_vt = launcher_logind_get_vt, }; diff --git a/libweston/launcher-util.c b/libweston/launcher-util.c index 96a0ba6f..03f3219b 100644 --- a/libweston/launcher-util.c +++ b/libweston/launcher-util.c @@ -86,13 +86,6 @@ weston_launcher_activate_vt(struct weston_launcher *launcher, int vt) return launcher->iface->activate_vt(launcher, vt); } -WL_EXPORT void -weston_launcher_restore(struct weston_launcher *launcher) -{ - launcher->iface->restore(launcher); -} - - static void switch_vt_binding(struct weston_keyboard *keyboard, const struct timespec *time, uint32_t key, void *data) diff --git a/libweston/launcher-util.h b/libweston/launcher-util.h index 93321ab7..242e1cc8 100644 --- a/libweston/launcher-util.h +++ b/libweston/launcher-util.h @@ -49,9 +49,6 @@ weston_launcher_close(struct weston_launcher *launcher, int fd); int weston_launcher_activate_vt(struct weston_launcher *launcher, int vt); -void -weston_launcher_restore(struct weston_launcher *launcher); - void weston_setup_vt_switch_bindings(struct weston_compositor *compositor); diff --git a/libweston/launcher-weston-launch.c b/libweston/launcher-weston-launch.c index 3d3b4d2f..65beb325 100644 --- a/libweston/launcher-weston-launch.c +++ b/libweston/launcher-weston-launch.c @@ -303,6 +303,5 @@ const struct launcher_interface launcher_weston_launch_iface = { .open = launcher_weston_launch_open, .close = launcher_weston_launch_close, .activate_vt = launcher_weston_launch_activate_vt, - .restore = launcher_weston_launch_restore, .get_vt = launcher_weston_launch_get_vt, };