static int s3cfb_release(struct fb_info *fb, int user) { struct s3cfb_window *win = fb->par; s3cfb_release_window(fb); mutex_lock(&fbdev->lock); atomic_dec(&win->in_use); mutex_unlock(&fbdev->lock); return 0; }
int s3cfb_release(struct fb_info *fb, int user) { struct s3cfb_window *win = fb->par; struct s3cfb_global *fbdev = get_fimd_global(fb->node); s3cfb_release_window(fb); mutex_lock(&fbdev->lock); atomic_dec(&win->in_use); mutex_unlock(&fbdev->lock); return 0; }
static int s3cfb_release(struct fb_info *fb, int user) { struct s3cfb_global *fbdev = platform_get_drvdata(to_platform_device(fb->device)); struct s3cfb_window *win = fb->par; s3cfb_release_window(fb); mutex_lock(&fbdev->lock); if (!WARN_ON(!win->in_use)) win->in_use--; mutex_unlock(&fbdev->lock); return 0; }