diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-01-21 17:42:49 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-02-13 18:07:58 -0500 |
commit | cd5428a5447cc6ca77ec6547d6f86834b205eac7 (patch) | |
tree | 7c7102f091f92176e81d38545401945903eeceaa /drivers/gpu/drm/cirrus | |
parent | 8acf658ad6246be7913647e6e76da6a539bff425 (diff) |
drm/<drivers>: simplify ->fb_probe callback
The fb helper lost its support for reallocating an fb completely, so
no need to return special success values any more.
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/cirrus')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_fbdev.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index b96605c6e1b6..e25afccaf85b 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c | |||
@@ -121,9 +121,10 @@ static int cirrusfb_create_object(struct cirrus_fbdev *afbdev, | |||
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | 123 | ||
124 | static int cirrusfb_create(struct cirrus_fbdev *gfbdev, | 124 | static int cirrusfb_create(struct drm_fb_helper *helper, |
125 | struct drm_fb_helper_surface_size *sizes) | 125 | struct drm_fb_helper_surface_size *sizes) |
126 | { | 126 | { |
127 | struct cirrus_fbdev *gfbdev = (struct cirrus_fbdev *)helper; | ||
127 | struct drm_device *dev = gfbdev->helper.dev; | 128 | struct drm_device *dev = gfbdev->helper.dev; |
128 | struct cirrus_device *cdev = gfbdev->helper.dev->dev_private; | 129 | struct cirrus_device *cdev = gfbdev->helper.dev->dev_private; |
129 | struct fb_info *info; | 130 | struct fb_info *info; |
@@ -220,23 +221,6 @@ out_iounmap: | |||
220 | return ret; | 221 | return ret; |
221 | } | 222 | } |
222 | 223 | ||
223 | static int cirrus_fb_find_or_create_single(struct drm_fb_helper *helper, | ||
224 | struct drm_fb_helper_surface_size | ||
225 | *sizes) | ||
226 | { | ||
227 | struct cirrus_fbdev *gfbdev = (struct cirrus_fbdev *)helper; | ||
228 | int new_fb = 0; | ||
229 | int ret; | ||
230 | |||
231 | if (!helper->fb) { | ||
232 | ret = cirrusfb_create(gfbdev, sizes); | ||
233 | if (ret) | ||
234 | return ret; | ||
235 | new_fb = 1; | ||
236 | } | ||
237 | return new_fb; | ||
238 | } | ||
239 | |||
240 | static int cirrus_fbdev_destroy(struct drm_device *dev, | 224 | static int cirrus_fbdev_destroy(struct drm_device *dev, |
241 | struct cirrus_fbdev *gfbdev) | 225 | struct cirrus_fbdev *gfbdev) |
242 | { | 226 | { |
@@ -268,7 +252,7 @@ static int cirrus_fbdev_destroy(struct drm_device *dev, | |||
268 | static struct drm_fb_helper_funcs cirrus_fb_helper_funcs = { | 252 | static struct drm_fb_helper_funcs cirrus_fb_helper_funcs = { |
269 | .gamma_set = cirrus_crtc_fb_gamma_set, | 253 | .gamma_set = cirrus_crtc_fb_gamma_set, |
270 | .gamma_get = cirrus_crtc_fb_gamma_get, | 254 | .gamma_get = cirrus_crtc_fb_gamma_get, |
271 | .fb_probe = cirrus_fb_find_or_create_single, | 255 | .fb_probe = cirrusfb_create, |
272 | }; | 256 | }; |
273 | 257 | ||
274 | int cirrus_fbdev_init(struct cirrus_device *cdev) | 258 | int cirrus_fbdev_init(struct cirrus_device *cdev) |