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:
Родитель
0d634f6e5b
Коммит
ee0d68ab5f
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче