drm/udl: use container_of to resolve udl_fbdev from drm_fb_helper

Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Fabian Frederick 2014-09-14 18:40:22 +02:00 коммит произвёл Daniel Vetter
Родитель 0d634f6e5b
Коммит ee0d68ab5f
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -472,7 +472,8 @@ udl_framebuffer_init(struct drm_device *dev,
static int udlfb_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
struct udl_fbdev *ufbdev = (struct udl_fbdev *)helper;
struct udl_fbdev *ufbdev =
container_of(helper, struct udl_fbdev, helper);
struct drm_device *dev = ufbdev->helper.dev;
struct fb_info *info;
struct device *device = dev->dev;