All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Noralf Trønnes" <noralf@tronnes.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"David Airlie" <airlied@linux.ie>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 1/2] drm: gm12u320: Some minor cleanups
Date: Tue, 30 Jul 2019 15:38:56 +0200	[thread overview]
Message-ID: <20190730133857.30778-1-hdegoede@redhat.com> (raw)

3 small cleanups:

1) Drop unused DRIVER_PATCHLEVEL
2) We do not set mode_config.preferred_depth, so instead of passing the
   unset mode_config.preferred_depth to drm_fbdev_generic_setup
   simply pass 0
3) Use __maybe_unused instead of #ifdef CONFIG_PM around the suspend /
   resume functions

Cc: Sam Ravnborg <sam@ravnborg.org>
Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/gm12u320/gm12u320.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/gm12u320/gm12u320.c b/drivers/gpu/drm/gm12u320/gm12u320.c
index 3dfe86defefc..a60854d7c14c 100644
--- a/drivers/gpu/drm/gm12u320/gm12u320.c
+++ b/drivers/gpu/drm/gm12u320/gm12u320.c
@@ -33,7 +33,6 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less bright, more silent)");
 #define DRIVER_DATE		"2019"
 #define DRIVER_MAJOR		1
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	1
 
 /*
  * The DLP has an actual width of 854 pixels, but that is not a multiple
@@ -747,7 +746,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface,
 	if (ret)
 		goto err_put;
 
-	drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
+	drm_fbdev_generic_setup(dev, 0);
 
 	return 0;
 
@@ -766,9 +765,8 @@ static void gm12u320_usb_disconnect(struct usb_interface *interface)
 	drm_dev_put(dev);
 }
 
-#ifdef CONFIG_PM
-static int gm12u320_suspend(struct usb_interface *interface,
-			    pm_message_t message)
+static __maybe_unused int gm12u320_suspend(struct usb_interface *interface,
+					   pm_message_t message)
 {
 	struct drm_device *dev = usb_get_intfdata(interface);
 	struct gm12u320_device *gm12u320 = dev->dev_private;
@@ -779,7 +777,7 @@ static int gm12u320_suspend(struct usb_interface *interface,
 	return 0;
 }
 
-static int gm12u320_resume(struct usb_interface *interface)
+static __maybe_unused int gm12u320_resume(struct usb_interface *interface)
 {
 	struct drm_device *dev = usb_get_intfdata(interface);
 	struct gm12u320_device *gm12u320 = dev->dev_private;
@@ -790,7 +788,6 @@ static int gm12u320_resume(struct usb_interface *interface)
 
 	return 0;
 }
-#endif
 
 static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(0x1de1, 0xc102) },
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-07-30 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 13:38 Hans de Goede [this message]
2019-07-30 13:38 ` [PATCH 2/2] drm: gm12u320: Use DRM_DEV_ERROR everywhere Hans de Goede
2019-08-01 14:59   ` Sam Ravnborg
2019-08-01 14:59 ` [PATCH 1/2] drm: gm12u320: Some minor cleanups Sam Ravnborg
2019-08-11 13:47   ` Hans de Goede
2019-08-12 19:33   ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730133857.30778-1-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.