[weston,13/21] compositor-fbdev: remove unused output arguments
xerpi.g.12 at gmail.com
xerpi.g.12 at gmail.com
Mon Sep 25 15:12:31 UTC 2017
On Fri, 2017-09-22 at 17:31 +0300, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> A few functions had argument 'output' which was not used at all. Remove
> such unused arguments.
>
> The coming migration to the head-based output API would have made it
> awkward to come up with the output argument for these, but luckily they
> are not actually needed.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
> libweston/compositor-fbdev.c | 22 +++++++++-------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
> index 840ccd7e..281e39b9 100644
> --- a/libweston/compositor-fbdev.c
> +++ b/libweston/compositor-fbdev.c
> @@ -261,8 +261,7 @@ calculate_refresh_rate(struct fb_var_screeninfo
> *vinfo)
> }
>
> static int
> -fbdev_query_screen_info(struct fbdev_output *output, int fd,
> - struct fbdev_screeninfo *info)
> +fbdev_query_screen_info(int fd, struct fbdev_screeninfo *info)
> {
> struct fb_var_screeninfo varinfo;
> struct fb_fix_screeninfo fixinfo;
> @@ -297,8 +296,7 @@ fbdev_query_screen_info(struct fbdev_output *output,
> int fd,
> }
>
> static int
> -fbdev_set_screen_info(struct fbdev_output *output, int fd,
> - struct fbdev_screeninfo *info)
> +fbdev_set_screen_info(int fd, struct fbdev_screeninfo *info)
> {
> struct fb_var_screeninfo varinfo;
>
> @@ -341,8 +339,8 @@ static void fbdev_frame_buffer_destroy(struct
> fbdev_output *output);
>
> /* Returns an FD for the frame buffer device. */
> static int
> -fbdev_frame_buffer_open(struct fbdev_output *output, const char *fb_dev,
> - struct fbdev_screeninfo *screen_info)
> +fbdev_frame_buffer_open(const char *fb_dev,
> + struct fbdev_screeninfo *screen_info)
> {
> int fd = -1;
>
> @@ -357,7 +355,7 @@ fbdev_frame_buffer_open(struct fbdev_output *output,
> const char *fb_dev,
> }
>
> /* Grab the screen info. */
> - if (fbdev_query_screen_info(output, fd, screen_info) < 0) {
> + if (fbdev_query_screen_info(fd, screen_info) < 0) {
> weston_log("Failed to get frame buffer info: %s\n",
> strerror(errno));
>
> @@ -436,7 +434,7 @@ fbdev_output_enable(struct weston_output *base)
> struct wl_event_loop *loop;
>
> /* Create the frame buffer. */
> - fb_fd = fbdev_frame_buffer_open(output, output->device, &output-
> >fb_info);
> + fb_fd = fbdev_frame_buffer_open(output->device, &output-
> >fb_info);
> if (fb_fd < 0) {
> weston_log("Creating frame buffer failed.\n");
> return -1;
> @@ -504,7 +502,7 @@ fbdev_output_create(struct fbdev_backend *backend,
> output->device = strdup(device);
>
> /* Create the frame buffer. */
> - fb_fd = fbdev_frame_buffer_open(output, device, &output-
> >fb_info);
> + fb_fd = fbdev_frame_buffer_open(device, &output->fb_info);
> if (fb_fd < 0) {
> weston_log("Creating frame buffer failed.\n");
> goto out_free;
> @@ -590,8 +588,7 @@ fbdev_output_reenable(struct fbdev_backend *backend,
> weston_log("Re-enabling fbdev output.\n");
>
> /* Create the frame buffer. */
> - fb_fd = fbdev_frame_buffer_open(output, output->device,
> - &new_screen_info);
> + fb_fd = fbdev_frame_buffer_open(output->device,
> &new_screen_info);
> if (fb_fd < 0) {
> weston_log("Creating frame buffer failed.\n");
> goto err;
> @@ -601,8 +598,7 @@ fbdev_output_reenable(struct fbdev_backend *backend,
> * disabled. */
> if (compare_screen_info (&output->fb_info, &new_screen_info) !=
> 0) {
> /* Perform a mode-set to restore the old mode. */
> - if (fbdev_set_screen_info(output, fb_fd,
> - &output->fb_info) < 0) {
> + if (fbdev_set_screen_info(fb_fd, &output->fb_info) < 0)
> {
> weston_log("Failed to restore mode settings. "
> "Attempting to re-open output
> anyway.\n");
> }
Reviewed-by: Sergi Granell <xerpi.g.12 at gmail.com>
More information about the wayland-devel
mailing list