[Mesa-dev] [PATCH 5/7] egl/wayland: use designated initializers

Thomas Helland thomashelland90 at gmail.com
Mon Jul 20 15:41:46 PDT 2015


This patch is:

Reviewed-by: Thomas Helland <thomashelland90 at gmail.com>

2015-07-10 19:49 GMT+02:00 Emil Velikov <emil.l.velikov at gmail.com>:
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/egl/drivers/dri2/platform_wayland.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index 1e12760..0b1adf8 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -65,7 +65,7 @@ sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
>  }
>
>  static const struct wl_callback_listener sync_listener = {
> -   sync_callback
> +   .done = sync_callback
>  };
>
>  static int
> @@ -104,8 +104,8 @@ wl_buffer_release(void *data, struct wl_buffer *buffer)
>     dri2_surf->color_buffers[i].locked = 0;
>  }
>
> -static struct wl_buffer_listener wl_buffer_listener = {
> -   wl_buffer_release
> +static const struct wl_buffer_listener wl_buffer_listener = {
> +   .release = wl_buffer_release
>  };
>
>  static void
> @@ -598,7 +598,7 @@ wayland_throttle_callback(void *data,
>  }
>
>  static const struct wl_callback_listener throttle_listener = {
> -   wayland_throttle_callback
> +   .done = wayland_throttle_callback
>  };
>
>  static void
> @@ -944,10 +944,10 @@ drm_handle_authenticated(void *data, struct wl_drm *drm)
>  }
>
>  static const struct wl_drm_listener drm_listener = {
> -       drm_handle_device,
> -       drm_handle_format,
> -       drm_handle_authenticated,
> -       drm_handle_capabilities
> +   .device = drm_handle_device,
> +   .format = drm_handle_format,
> +   .authenticated = drm_handle_authenticated,
> +   .capabilities = drm_handle_capabilities
>  };
>
>  static void
> @@ -972,8 +972,8 @@ registry_handle_global_remove(void *data, struct wl_registry *registry,
>  }
>
>  static const struct wl_registry_listener registry_listener_drm = {
> -   registry_handle_global_drm,
> -   registry_handle_global_remove
> +   .global = registry_handle_global_drm,
> +   .global_remove = registry_handle_global_remove
>  };
>
>  static EGLBoolean
> @@ -1729,7 +1729,7 @@ shm_handle_format(void *data, struct wl_shm *shm, uint32_t format)
>  }
>
>  static const struct wl_shm_listener shm_listener = {
> -   shm_handle_format
> +   .format = shm_handle_format
>  };
>
>  static void
> @@ -1746,8 +1746,8 @@ registry_handle_global_swrast(void *data, struct wl_registry *registry, uint32_t
>  }
>
>  static const struct wl_registry_listener registry_listener_swrast = {
> -   registry_handle_global_swrast,
> -   registry_handle_global_remove
> +   .global = registry_handle_global_swrast,
> +   .global_remove = registry_handle_global_remove
>  };
>
>  static struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
> --
> 2.4.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list