]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/arcpgu: Add local 'fb' variables
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Nov 2016 19:52:44 +0000 (21:52 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 14 Dec 2016 20:36:39 +0000 (22:36 +0200)
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 <abrodkin@synopsys.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-9-git-send-email-ville.syrjala@linux.intel.com
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
drivers/gpu/drm/arc/arcpgu_crtc.c

index 7130b044b004a87cab8af76c0a798c3bcb4e0c0e..5c26c5f126a3726503aab5a0d241e21a641538c6 100644 (file)
@@ -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;