summaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb/ddk750_chip.h
diff options
context:
space:
mode:
authorMihaela Muraru <mihaela.muraru21@gmail.com>2016-10-06 11:07:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-16 10:24:18 +0200
commit9872fa751e0bad862161c442d44b7ea597e23676 (patch)
treee908e11726e526bb3976321492d07751b3e13987 /drivers/staging/sm750fb/ddk750_chip.h
parente0cb35095753c038f42d1b6bf68c4cd063b3fd21 (diff)
Staging: sm750fb: fix do not add new typedefs warning
This patch fixes the checkpatch.pl warning: "WARNING: do not add new typedefs". Hiding a variables of type 'struct' is not always a good idea,because when we passing them as parameters we tempt to forget that in this proces we work with stack memory and allocatting struct on stack is something that we should manage carefuly. It is also delete the '_t' from the name of the structs and treat a line over 80 character issue in ddk750_mode.c, that appear after my modification. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/ddk750_chip.h')
-rw-r--r--drivers/staging/sm750fb/ddk750_chip.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
index 14357fd1cc6b..a4ee35917fde 100644
--- a/drivers/staging/sm750fb/ddk750_chip.h
+++ b/drivers/staging/sm750fb/ddk750_chip.h
@@ -25,7 +25,7 @@ typedef enum _clock_type_t {
}
clock_type_t;
-typedef struct _pll_value_t {
+struct pll_value {
clock_type_t clockType;
unsigned long inputFreq; /* Input clock frequency to the PLL */
@@ -34,11 +34,10 @@ typedef struct _pll_value_t {
unsigned long N;
unsigned long OD;
unsigned long POD;
-}
-pll_value_t;
+};
/* input struct to initChipParam() function */
-typedef struct _initchip_param_t {
+struct initchip_param {
unsigned short powerMode; /* Use power mode 0 or 1 */
unsigned short chipClock; /**
* Speed of main chip clock in MHz unit
@@ -66,14 +65,13 @@ typedef struct _initchip_param_t {
*/
/* More initialization parameter can be added if needed */
-}
-initchip_param_t;
+};
logical_chip_type_t sm750_get_chip_type(void);
-unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
-unsigned int formatPllReg(pll_value_t *pPLL);
+unsigned int calcPllValue(unsigned int request, struct pll_value *pll);
+unsigned int formatPllReg(struct pll_value *pPLL);
void ddk750_set_mmio(void __iomem *, unsigned short, char);
unsigned int ddk750_getVMSize(void);
-int ddk750_initHw(initchip_param_t *);
+int ddk750_initHw(struct initchip_param *);
#endif