From patchwork Sun Feb 11 17:23:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Luetke-Stetzkamp X-Patchwork-Id: 10211383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3ECD760329 for ; Sun, 11 Feb 2018 17:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E5EC2894A for ; Sun, 11 Feb 2018 17:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 108C728AF5; Sun, 11 Feb 2018 17:30:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E5342894A for ; Sun, 11 Feb 2018 17:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753504AbeBKRas (ORCPT ); Sun, 11 Feb 2018 12:30:48 -0500 Received: from volans.uberspace.de ([95.143.172.210]:48628 "EHLO volans.uberspace.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752496AbeBKRas (ORCPT ); Sun, 11 Feb 2018 12:30:48 -0500 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Sun, 11 Feb 2018 12:30:47 EST Received: (qmail 30294 invoked by uid 691); 11 Feb 2018 17:24:06 -0000 Received: from demeter.lkamp.de by volans.uberspace.de with BSMTP; 11 Feb 2018 17:24:06 -0000 Received: by demeter.lkamp.de (Postfix, from userid 1000) id 7CD593805B0; Sun, 11 Feb 2018 18:24:01 +0100 (CET) From: Christian Luetke-Stetzkamp To: Sudip Mukherjee , Teddy Wang , Greg Kroah-Hartman , Sudip Mukherjee Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, Christian Luetke-Stetzkamp Subject: [PATCH] staging: sm750fb: Remove typedefs from enums Date: Sun, 11 Feb 2018 18:23:17 +0100 Message-Id: <20180211172317.1201-1-christian@lkamp.de> X-Mailer: git-send-email 2.13.6 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes checkpatch.pl warning: do not add new typedefs. Signed-off-by: Christian Luetke-Stetzkamp --- drivers/staging/sm750fb/ddk750_chip.c | 4 ++-- drivers/staging/sm750fb/ddk750_chip.h | 14 ++++++-------- drivers/staging/sm750fb/ddk750_mode.c | 2 +- drivers/staging/sm750fb/ddk750_mode.h | 2 +- drivers/staging/sm750fb/sm750_hw.c | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 313b99104398..4c1f00f551da 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -8,9 +8,9 @@ #define MHz(x) ((x) * 1000000) -static logical_chip_type_t chip; +static enum logical_chip_type chip; -logical_chip_type_t sm750_get_chip_type(void) +enum logical_chip_type sm750_get_chip_type(void) { return chip; } diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h index aee82fcaf669..c72aac21b675 100644 --- a/drivers/staging/sm750fb/ddk750_chip.h +++ b/drivers/staging/sm750fb/ddk750_chip.h @@ -24,25 +24,23 @@ static inline void poke32(u32 addr, u32 data) } /* This is all the chips recognized by this library */ -typedef enum _logical_chip_type_t { +enum logical_chip_type { SM_UNKNOWN, SM718, SM750, SM750LE, -} -logical_chip_type_t; +}; -typedef enum _clock_type_t { +enum clock_type { MXCLK_PLL, PRIMARY_PLL, SECONDARY_PLL, VGA0_PLL, VGA1_PLL, -} -clock_type_t; +}; struct pll_value { - clock_type_t clockType; + enum clock_type clockType; unsigned long inputFreq; /* Input clock frequency to the PLL */ /* Use this when clockType = PANEL_PLL */ @@ -94,7 +92,7 @@ struct initchip_param { /* More initialization parameter can be added if needed */ }; -logical_chip_type_t sm750_get_chip_type(void); +enum logical_chip_type sm750_get_chip_type(void); void sm750_set_chip_type(unsigned short devId, u8 revId); unsigned int sm750_calc_pll_value(unsigned int request, struct pll_value *pll); unsigned int sm750_format_pll_reg(struct pll_value *pPLL); diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index 2cdd87b78e58..7e22d093b091 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -206,7 +206,7 @@ static int programModeRegisters(struct mode_parameter *pModeParam, return ret; } -int ddk750_setModeTiming(struct mode_parameter *parm, clock_type_t clock) +int ddk750_setModeTiming(struct mode_parameter *parm, enum clock_type clock) { struct pll_value pll; unsigned int uiActualPixelClk; diff --git a/drivers/staging/sm750fb/ddk750_mode.h b/drivers/staging/sm750fb/ddk750_mode.h index 259a9d6a4eb2..2df78a0937b2 100644 --- a/drivers/staging/sm750fb/ddk750_mode.h +++ b/drivers/staging/sm750fb/ddk750_mode.h @@ -33,5 +33,5 @@ struct mode_parameter { enum spolarity clock_phase_polarity; }; -int ddk750_setModeTiming(struct mode_parameter *parm, clock_type_t clock); +int ddk750_setModeTiming(struct mode_parameter *parm, enum clock_type clock); #endif diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c index a8c79864ee4b..f996f8460641 100644 --- a/drivers/staging/sm750fb/sm750_hw.c +++ b/drivers/staging/sm750fb/sm750_hw.c @@ -254,7 +254,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, int ret, fmt; u32 reg; struct mode_parameter modparm; - clock_type_t clock; + enum clock_type clock; struct sm750_dev *sm750_dev; struct lynxfb_par *par;