From patchwork Mon Mar 9 07:35:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5965121 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1A9DE9FB2B for ; Mon, 9 Mar 2015 07:35:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 546872024F for ; Mon, 9 Mar 2015 07:35:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63AE5202EB for ; Mon, 9 Mar 2015 07:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbbCIHfa (ORCPT ); Mon, 9 Mar 2015 03:35:30 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:46586 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752768AbbCIHf0 (ORCPT ); Mon, 9 Mar 2015 03:35:26 -0400 Received: by pdev10 with SMTP id v10so32574312pde.13; Mon, 09 Mar 2015 00:35:25 -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=Sxg2PNpxb3SN8yFiUHK3hZDkf8UKB8lo9ylJxWbHOvY=; b=n9RrNohlIaeH6Gi3Nyeg4d4FYPUFuLSLN6yvxG8FO/xZ8obNb/ft2g8aLbSvuuq9f1 TLIhceZu/eioNPq+QRgzgfxLHGmXTjalnDuoVeRYkh6Ys4fDORkg49uLNVpQUZ7yAykS /bgAJ9/NimlWwgEDUzW3S7idH0Cb08AwAUiYjIMMv6HvLupr4osMgMCuK+WIoeCQnxhs TUkli508/5Zwdgs7S+G9FByl1I1eYiyUfw1YtfsCpLf8OSnZRvzgpjMPaf1vikS8GUTm yoZO2IyOcKakL+a+kD5XS9sBds4I2h/eIYf17h8d9zlpBSYz2wmzyKMdlmqqtkANe7NI H2Cw== X-Received: by 10.66.219.233 with SMTP id pr9mr51239967pac.8.1425886525517; Mon, 09 Mar 2015 00:35:25 -0700 (PDT) Received: from localhost.localdomain ([122.169.145.94]) by mx.google.com with ESMTPSA id a4sm17553024pdf.57.2015.03.09.00.35.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Mar 2015 00:35:25 -0700 (PDT) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: Sudip Mukherjee , linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] staging: sm750fb: correctly define SM750LE_REVISION_ID Date: Mon, 9 Mar 2015 13:05:05 +0530 Message-Id: <1425886506-8643-3-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1425886506-8643-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1425886506-8643-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 --- v2: removed the redundant cast in sm750_hw.c 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; }