From patchwork Tue Mar 10 08:45:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5975601 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 09542BF440 for ; Tue, 10 Mar 2015 08:46:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 307702024D for ; Tue, 10 Mar 2015 08:46:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4ED612017D for ; Tue, 10 Mar 2015 08:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752660AbbCJIqU (ORCPT ); Tue, 10 Mar 2015 04:46:20 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:46367 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752635AbbCJIqS (ORCPT ); Tue, 10 Mar 2015 04:46:18 -0400 Received: by pdev10 with SMTP id v10so42005pde.13; Tue, 10 Mar 2015 01:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Jszgf/+ByxA107gJLxDfJWVNFHLFl4vsRxLBeRRRfvw=; b=Sd0OK7+3vofBT/2LtC9LeYLdm6k+ldfgE5a4K0hDyuJE0zLS0P88NIxGDtJD7kbbvs f2IXbSkdD018XJZ7HkN0S61rMSPLUAijeYQDkvwWDAtBCmQPGPTrNEPM4Er6raBJoagC BT3TWZT+xit30tpdFKSN1RVN4zcTNlwsEJzCcB7i2sA04UjjsgGCotPvun8QZlOmGd3Z KIq2AitB5+QbNf+IhTryZysXIUNYqI+lhkWuT47GtnzJsS8ULYDyU2Rr/98hACdBFks2 lFIj7+ArPomxQx/OcPkx5+8LE27TfzJSrAq74SasjlglLKY2wh/rV0bnmkhjvhkBMQ8A zkhw== X-Received: by 10.66.240.228 with SMTP id wd4mr9094381pac.80.1425977177907; Tue, 10 Mar 2015 01:46:17 -0700 (PDT) Received: from localhost.localdomain ([122.169.145.94]) by mx.google.com with ESMTPSA id v2sm22937994pdm.77.2015.03.10.01.46.15 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Mar 2015 01:46:17 -0700 (PDT) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v3 3/5] staging: sm750fb: correctly define SM750LE_REVISION_ID Date: Tue, 10 Mar 2015 14:15:37 +0530 Message-Id: <1425977139-25285-3-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1425977139-25285-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1425977139-25285-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP check if it is already defined before defining SM750LE_REVISION_ID again and at the same time mention correct data type. Signed-off-by: Sudip Mukherjee --- v3: no change v2: removed the redundant cast in sm750_hw.c SM750LE_REVISION_ID is defined also in ddk750_chip.h. drivers/staging/sm750fb/ddk750_chip.h | 4 +++- drivers/staging/sm750fb/sm750_hw.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h index 1c78875..d761b72 100644 --- a/drivers/staging/sm750fb/ddk750_chip.h +++ b/drivers/staging/sm750fb/ddk750_chip.h @@ -1,7 +1,9 @@ #ifndef DDK750_CHIP_H__ #define DDK750_CHIP_H__ #define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */ -#define SM750LE_REVISION_ID (char)0xfe +#ifndef SM750LE_REVISION_ID +#define SM750LE_REVISION_ID ((unsigned char)0xfe) +#endif /* This is all the chips recognized by this library */ typedef enum _logical_chip_type_t diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c index ec2d499..a2b7fe2 100644 --- a/drivers/staging/sm750fb/sm750_hw.c +++ b/drivers/staging/sm750fb/sm750_hw.c @@ -277,7 +277,7 @@ int hw_sm750_crtc_checkMode(struct lynxfb_crtc* crtc,struct fb_var_screeninfo* v case 16: break; case 32: - if(share->revid == (unsigned char)SM750LE_REVISION_ID){ + if (share->revid == SM750LE_REVISION_ID) { pr_debug("750le do not support 32bpp\n"); return -EINVAL; }