From patchwork Mon Jun 19 17:21:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simran Singhal X-Patchwork-Id: 9797039 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 068A6601C8 for ; Mon, 19 Jun 2017 17:21:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4D4E1FFAD for ; Mon, 19 Jun 2017 17:21:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C93EC27F8F; Mon, 19 Jun 2017 17:21:28 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 673BD1FFAD for ; Mon, 19 Jun 2017 17:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750925AbdFSRV1 (ORCPT ); Mon, 19 Jun 2017 13:21:27 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33454 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbdFSRV0 (ORCPT ); Mon, 19 Jun 2017 13:21:26 -0400 Received: by mail-pg0-f66.google.com with SMTP id u62so11501328pgb.0; Mon, 19 Jun 2017 10:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=0LdtomHhFPWJShXoTpM/ccK/uYmuqmUYnJ5PMGl/PJE=; b=cYZw7n6DLdCEzLaGa89wm1g1YuQK0gvhnqPGyyD8IPZQeJ/PPPdwAZKp2PTTSbGkIb ym1grnA0ZTnZ5yPjKobt/qDMMvUnAgV1pSM4KNiavD4ZnvGD5I7NEWEyUayUniu4XWcB UI9mfWghsQfWZTDAl+HcFQMC6EyVknAR/LzftL8x+jEtWhedk7e1Qtn745hQC8NCwkPs XAkhKx6vfcXuv7ycHC4UZK3OQ/wBPgNHwg8fqOWnx92YFAyf54LdlIdJ9l/XdJEYqTOz Epk/VCHoJsuRqepvzZfeEZCaS187b/RFp1Xo/Kmxp5K34l/d2I6t9rwKh+D5kev5eQmK QALg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=0LdtomHhFPWJShXoTpM/ccK/uYmuqmUYnJ5PMGl/PJE=; b=YEKWbNJl7yfwldre5TxI01jJm/r4rUm2II6oznzGxNpHyRJtOhkeJvaJYDD2jgbzs5 EBHDtv7G6r/v0d0n5cGoAvJ9jplbm14wbYpJAZNGlDnebtTEUZoIAQPd1H1FT24vKx1w xu3aqSmPlLZymbaDBInvkjJ5JYva44zz1A5WvYORSEQAdb9pfXhFgDakd6/+SJ4SbIPG YCkIlATmNV/C+hrFqQkk7xM2Xr+Vt+EmGpAmN427x0cP98LUelTGt2DArFCoL13wmpOE nm7M3HKosShbBSr5IhLQXUOaTP6yGbTQ3zEnIW2GeagEbD4gYfG4CT0awutpII5pCrhE Os5Q== X-Gm-Message-State: AKS2vOxn3iJvqrUr9fQk9+Cn/SE4oW1DFKBx4s5MA/x9eLsibppgWgxp F5z0xF8FBRmpim4x X-Received: by 10.99.111.194 with SMTP id k185mr27533037pgc.69.1497892885221; Mon, 19 Jun 2017 10:21:25 -0700 (PDT) Received: from singhal-Inspiron-5558 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id p23sm21134192pfk.67.2017.06.19.10.21.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 10:21:24 -0700 (PDT) Date: Mon, 19 Jun 2017 22:51:21 +0530 From: Simran Singhal To: Greg Kroah-Hartman Cc: Sudip Mukherjee , Teddy Wang , linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: sm750fb: Remove typedefs from _logical_chip_type_t and _clock_type_t Message-ID: <20170619172120.GA28772@singhal-Inspiron-5558> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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 This patch removes typedefs from enum _logical_chip_type_t and enum _clock_type_t and rename them to logical_chip_type_t and clock_type_t respectively. Fix checkpatch warning: WARNING: do not add new typedefs Signed-off-by: Simran Singhal --- 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 944dd25..db4d2fc 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -7,9 +7,9 @@ #define MHz(x) ((x) * 1000000) -static logical_chip_type_t chip; +static enum logical_chip_type_t chip; -logical_chip_type_t sm750_get_chip_type(void) +enum logical_chip_type_t sm750_get_chip_type(void) { return chip; } diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h index 2c7a9b9..df1f586 100644 --- a/drivers/staging/sm750fb/ddk750_chip.h +++ b/drivers/staging/sm750fb/ddk750_chip.h @@ -23,25 +23,23 @@ static inline void poke32(u32 data, u32 addr) } /* This is all the chips recognized by this library */ -typedef enum _logical_chip_type_t { +enum logical_chip_type_t { SM_UNKNOWN, SM718, SM750, SM750LE, -} -logical_chip_type_t; +}; -typedef enum _clock_type_t { +enum clock_type_t { MXCLK_PLL, PRIMARY_PLL, SECONDARY_PLL, VGA0_PLL, VGA1_PLL, -} -clock_type_t; +}; struct pll_value { - clock_type_t clockType; + enum clock_type_t clockType; unsigned long inputFreq; /* Input clock frequency to the PLL */ /* Use this when clockType = PANEL_PLL */ @@ -93,7 +91,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_t 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 bb673e1..6242770 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -205,7 +205,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_t 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 d5eae36..78a3cc7 100644 --- a/drivers/staging/sm750fb/ddk750_mode.h +++ b/drivers/staging/sm750fb/ddk750_mode.h @@ -32,5 +32,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_t clock); #endif diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c index baf1bbd..8836e324 100644 --- a/drivers/staging/sm750fb/sm750_hw.c +++ b/drivers/staging/sm750fb/sm750_hw.c @@ -253,7 +253,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_t clock; struct sm750_dev *sm750_dev; struct lynxfb_par *par;