From patchwork Thu Jun 18 12:17:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6636581 Return-Path: X-Original-To: patchwork-linux-arm@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 B283B9F358 for ; Thu, 18 Jun 2015 12:22:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6FAD2082F for ; Thu, 18 Jun 2015 12:22:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B77412081F for ; Thu, 18 Jun 2015 12:22:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5Ynv-0001Rg-Bz; Thu, 18 Jun 2015 12:20:23 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5YmY-000076-K9; Thu, 18 Jun 2015 12:18:59 +0000 Received: by pabvl15 with SMTP id vl15so14276931pab.1; Thu, 18 Jun 2015 05:18:36 -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=dTy1fi0CgOpCzPzYa6tealrgH3mEc5+SmPTKJazw3pM=; b=cJN8B3WX0uJebhHZdOEb439I7hJmnd+ut9q9mua6qYMH7yld3Qd5xautXGtGBaT9tT 7zFugL5ejybam76ixlMPioaJoZPAP7Lj5v29fliYLsfE/1OzmN+Y5jdPUns0LOohkM48 3xuQXv8/33L1Pfaj4feRHkgnkxoNT39Ewxkq9Xg/qRVHFzDkRjdYsurjezAJNYRVJNr6 onst6zytO+fOc3UNm9Dud747CJLMnTZ3OXs1WIZWXOx58U268NjJVMxzjdIBZUQTofsH Zf2DyAfZm3ZbRgQJG3r/OL7cNTUXoI7935QmGLLtAGFKuk4FZxUxCfjl7F6tZ5QR4jdh 1eqA== X-Received: by 10.70.132.195 with SMTP id ow3mr20418238pdb.87.1434629916546; Thu, 18 Jun 2015 05:18:36 -0700 (PDT) Received: from localhost.localdomain ([122.169.128.34]) by mx.google.com with ESMTPSA id qw13sm7986650pab.14.2015.06.18.05.18.31 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jun 2015 05:18:35 -0700 (PDT) From: Sudip Mukherjee To: David Howells , Ulf Hansson , Matthias Brugger , Johan Hovold , Greg Kroah-Hartman Subject: [PATCH v2 4/7] USB: mos7720: rename DCR Date: Thu, 18 Jun 2015 17:47:50 +0530 Message-Id: <1434629873-11668-5-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434629873-11668-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1434629873-11668-1-git-send-email-sudipm.mukherjee@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150618_051858_726839_7598C3E0 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-am33-list@redhat.com, linux-usb@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Sudip Mukherjee , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 While building with mn10300 it failed with: error: expected identifier before '(' token #define __SYSREG(ADDR, TYPE) (*(volatile TYPE *)(ADDR)) note: in expansion of macro '__SYSREG' #define DCR __SYSREG(0xc0000030, u16) /* Debug control register */ mn10300 has a register named as DCR, so when this driver used an enum named as DCR, build failed. Just rename the DCR in the driver to parport_DCR. Signed-off-by: Sudip Mukherjee --- drivers/usb/serial/mos7720.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 4f70df3..3263125 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -135,7 +135,7 @@ enum mos_regs { DLM, DPR, /* parallel port regs */ DSR, - DCR, + parport_DCR, ECR, SP1_REG, /* device control regs */ SP2_REG, /* serial port 2 (7720 only) */ @@ -164,7 +164,7 @@ static inline __u16 get_reg_index(enum mos_regs reg) 0x01, /* DLM */ 0x00, /* DPR */ 0x01, /* DSR */ - 0x02, /* DCR */ + 0x02, /* parport_DCR */ 0x0a, /* ECR */ 0x01, /* SP1_REG */ 0x02, /* SP2_REG (7720 only) */ @@ -510,7 +510,7 @@ static void parport_mos7715_write_control(struct parport *pp, unsigned char d) if (parport_prologue(pp) < 0) return; data = ((__u8)d & 0x0f) | (mos_parport->shadowDCR & 0xf0); - write_mos_reg(mos_parport->serial, dummy, DCR, data); + write_mos_reg(mos_parport->serial, dummy, parport_DCR, data); mos_parport->shadowDCR = data; parport_epilogue(pp); } @@ -543,7 +543,7 @@ static unsigned char parport_mos7715_frob_control(struct parport *pp, if (parport_prologue(pp) < 0) return 0; mos_parport->shadowDCR = (mos_parport->shadowDCR & (~mask)) ^ val; - write_mos_reg(mos_parport->serial, dummy, DCR, mos_parport->shadowDCR); + write_mos_reg(mos_parport->serial, dummy, parport_DCR, mos_parport->shadowDCR); dcr = mos_parport->shadowDCR & 0x0f; parport_epilogue(pp); return dcr; @@ -581,7 +581,7 @@ static void parport_mos7715_data_forward(struct parport *pp) return; mos7715_change_mode(mos_parport, PS2); mos_parport->shadowDCR &= ~0x20; - write_mos_reg(mos_parport->serial, dummy, DCR, mos_parport->shadowDCR); + write_mos_reg(mos_parport->serial, dummy, parport_DCR, mos_parport->shadowDCR); parport_epilogue(pp); } @@ -593,7 +593,7 @@ static void parport_mos7715_data_reverse(struct parport *pp) return; mos7715_change_mode(mos_parport, PS2); mos_parport->shadowDCR |= 0x20; - write_mos_reg(mos_parport->serial, dummy, DCR, mos_parport->shadowDCR); + write_mos_reg(mos_parport->serial, dummy, parport_DCR, mos_parport->shadowDCR); parport_epilogue(pp); } @@ -633,7 +633,7 @@ static void parport_mos7715_restore_state(struct parport *pp, spin_unlock(&release_lock); return; } - write_parport_reg_nonblock(mos_parport, DCR, mos_parport->shadowDCR); + write_parport_reg_nonblock(mos_parport, parport_DCR, mos_parport->shadowDCR); write_parport_reg_nonblock(mos_parport, ECR, mos_parport->shadowECR); spin_unlock(&release_lock); } @@ -719,7 +719,7 @@ static int mos7715_parport_init(struct usb_serial *serial) /* initialize device registers */ mos_parport->shadowDCR = DCR_INIT_VAL; - write_mos_reg(mos_parport->serial, dummy, DCR, mos_parport->shadowDCR); + write_mos_reg(mos_parport->serial, dummy, parport_DCR, mos_parport->shadowDCR); mos_parport->shadowECR = ECR_INIT_VAL; write_mos_reg(mos_parport->serial, dummy, ECR, mos_parport->shadowECR);