From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: [PATCH 03/12] gma500: psb_intel_lvds style
Date: Fri, 08 Jul 2011 09:43:29 +0100 [thread overview]
Message-ID: <20110708084326.19581.94514.stgit@localhost.localdomain> (raw)
In-Reply-To: <20110708084053.19581.81711.stgit@localhost.localdomain>
From: Alan Cox <alan@linux.intel.com>
Fixed some stylistic uglies noticed while fixing the previous bug
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/staging/gma500/psb_intel_lvds.c | 49 +++++++++++++++----------------
1 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/gma500/psb_intel_lvds.c b/drivers/staging/gma500/psb_intel_lvds.c
index 1e1e788..c4111b5 100644
--- a/drivers/staging/gma500/psb_intel_lvds.c
+++ b/drivers/staging/gma500/psb_intel_lvds.c
@@ -30,10 +30,7 @@
#include "power.h"
#include <linux/pm_runtime.h>
-u32 CoreClock;
-u32 PWMControlRegFreq;
-
-/**
+/*
* LVDS I2C backlight control macros
*/
#define BRIGHTNESS_MAX_LEVEL 100
@@ -51,7 +48,7 @@ u32 PWMControlRegFreq;
#define PSB_BACKLIGHT_PWM_POLARITY_BIT_CLEAR (0xFFFE)
struct psb_intel_lvds_priv {
- /**
+ /*
* Saved LVDO output states
*/
uint32_t savePP_ON;
@@ -64,9 +61,8 @@ struct psb_intel_lvds_priv {
uint32_t saveBLC_PWM_CTL;
};
-/* MRST defines end */
-/**
+/*
* Returns the maximum level of the backlight duty cycle field.
*/
static u32 psb_intel_lvds_get_max_backlight(struct drm_device *dev)
@@ -161,7 +157,7 @@ static int psb_lvds_pwm_set_brightness(struct drm_device *dev, int level)
return 0;
}
-/**
+/*
* Set LVDS backlight level either by I2C or PWM
*/
void psb_intel_lvds_set_brightness(struct drm_device *dev, int level)
@@ -183,10 +179,10 @@ void psb_intel_lvds_set_brightness(struct drm_device *dev, int level)
psb_lvds_pwm_set_brightness(dev, level);
}
-/**
+/*
* Sets the backlight level.
*
- * \param level backlight level, from 0 to psb_intel_lvds_get_max_backlight().
+ * level: backlight level, from 0 to psb_intel_lvds_get_max_backlight().
*/
static void psb_intel_lvds_set_backlight(struct drm_device *dev, int level)
{
@@ -208,7 +204,7 @@ static void psb_intel_lvds_set_backlight(struct drm_device *dev, int level)
}
}
-/**
+/*
* Sets the power state for the panel.
*/
static void psb_intel_lvds_set_power(struct drm_device *dev,
@@ -501,7 +497,7 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder,
REG_WRITE(PFIT_CONTROL, pfit_control);
}
-/**
+/*
* Detect the LVDS connection.
*
* This always returns CONNECTOR_STATUS_CONNECTED.
@@ -514,7 +510,7 @@ static enum drm_connector_status psb_intel_lvds_detect(struct drm_connector
return connector_status_connected;
}
-/**
+/*
* Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
*/
static int psb_intel_lvds_get_modes(struct drm_connector *connector)
@@ -575,18 +571,18 @@ int psb_intel_lvds_set_property(struct drm_connector *connector,
{
struct drm_encoder *encoder = connector->encoder;
struct drm_psb_private *dev_priv;
-
+
if (!encoder)
- return -1;
+ return -1;
dev_priv = encoder->dev->dev_private;
if (!strcmp(property->name, "scaling mode")) {
- struct psb_intel_crtc *pPsbCrtc =
+ struct psb_intel_crtc *crtc =
to_psb_intel_crtc(encoder->crtc);
uint64_t curValue;
- if (!pPsbCrtc)
+ if (!crtc)
goto set_prop_error;
switch (value) {
@@ -613,10 +609,10 @@ int psb_intel_lvds_set_property(struct drm_connector *connector,
value))
goto set_prop_error;
- if (pPsbCrtc->saved_mode.hdisplay != 0 &&
- pPsbCrtc->saved_mode.vdisplay != 0) {
+ if (crtc->saved_mode.hdisplay != 0 &&
+ crtc->saved_mode.vdisplay != 0) {
if (!drm_crtc_helper_set_mode(encoder->crtc,
- &pPsbCrtc->saved_mode,
+ &crtc->saved_mode,
encoder->crtc->x,
encoder->crtc->y,
encoder->crtc->fb))
@@ -629,11 +625,12 @@ int psb_intel_lvds_set_property(struct drm_connector *connector,
goto set_prop_error;
else {
#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
- struct backlight_device *bd = dev_priv->backlight_device;
+ struct backlight_device *bd =
+ dev_priv->backlight_device;
if (bd) {
- bd->props.brightness = value;
- backlight_update_status(bd);
- }
+ bd->props.brightness = value;
+ backlight_update_status(bd);
+ }
#endif
}
} else if (!strcmp(property->name, "DPMS")) {
@@ -749,7 +746,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
dev_priv->backlight_property,
BRIGHTNESS_MAX_LEVEL);
- /**
+ /*
* Set up I2C bus
* FIXME: distroy i2c_bus when exit
*/
@@ -797,7 +794,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
}
}
- /* Failed to get EDID, what about VBT? do we need this?*/
+ /* Failed to get EDID, what about VBT? do we need this? */
if (mode_dev->vbt_mode)
mode_dev->panel_fixed_mode =
drm_mode_duplicate(dev, mode_dev->vbt_mode);
next prev parent reply other threads:[~2011-07-08 8:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 8:42 [PATCH 00/12] Fixing and cleaning Alan Cox
2011-07-08 8:42 ` [PATCH 01/12] gma500: strip unneeded version headers Alan Cox
2011-07-08 8:43 ` [PATCH 02/12] gma500: Re-order checks and dereferences in psb_intel_lvds Alan Cox
2011-07-08 20:44 ` Greg KH
2011-07-09 0:57 ` Alan Cox
2011-07-08 8:43 ` Alan Cox [this message]
2011-07-08 8:43 ` [PATCH 04/12] gma500: Fix symbol clash with i915 Alan Cox
2011-07-08 8:44 ` [PATCH 05/12] gma500: Mask out bits not part of the page table base address Alan Cox
2011-07-08 8:44 ` [PATCH 06/12] gma500: tidy up the CDV files Alan Cox
2011-07-08 8:44 ` [PATCH 07/12] gma500: tidy the mrst files Alan Cox
2011-07-08 8:44 ` [PATCH 08/12] gma500; clean mid files Alan Cox
2011-07-08 8:45 ` [PATCH 09/12] gma500: Fix unused variable in cdv support Alan Cox
2011-07-08 8:45 ` [PATCH 10/12] Staging: gma500: typo in array initialization Alan Cox
2011-07-08 8:45 ` [PATCH 11/12] gma500: reversed test in mdfld_dbi_dsr_exit() Alan Cox
2011-07-08 8:45 ` [PATCH 12/12] gma500: remove unneeded check in mdfld_crtc_mode_set() Alan Cox
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=20110708084326.19581.94514.stgit@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.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.