From: Ville Syrjälä Date: Fri, 18 Nov 2016 19:52:44 +0000 (+0200) Subject: drm/arcpgu: Add local 'fb' variables X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81852b6abcdfce80ce60294c7910ac85e83105ba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/arcpgu: Add local 'fb' variables Add a local 'fb' variable to a few places to get rid of the 'crtc->primary->fb' stuff. Looks neater and helps me with my ppor coccinelle skills later. Cc: Alexey Brodkin Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-9-git-send-email-ville.syrjala@linux.intel.com Acked-by: Alexey Brodkin --- diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 7130b044b004..5c26c5f126a3 100644 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c @@ -35,7 +35,8 @@ static struct simplefb_format supported_formats[] = { static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc) { struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc); - uint32_t pixel_format = crtc->primary->state->fb->pixel_format; + const struct drm_framebuffer *fb = crtc->primary->state->fb; + uint32_t pixel_format = fb->pixel_format; struct simplefb_format *format = NULL; int i;