From: Arnd Bergmann <arnd@arndb.de>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: linux-kernel@vger.kernel.org,
Juan David Gonzalez Cobas <juan.david.gonzalez.cobas@cern.ch>,
"Emilio G. Cota" <cota@braap.org>,
Samuel Iglesias Gonsalvez <siglesias@igalia.com>,
gregkh@linuxfoundation.org, Rob Landley <rob@landley.net>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/8] FMC: add needed headers
Date: Wed, 19 Jun 2013 12:49:30 +0200 [thread overview]
Message-ID: <2530586.aQgWYlUvJa@wuerfel> (raw)
In-Reply-To: <1d3aedf8636f4bed4ffda25e13acd853bf8e08fb.1371018406.git.rubini@gnudd.com>
On Wednesday 12 June 2013 09:13:36 Alessandro Rubini wrote:
> + */
> +struct fmc_operations {
> + uint32_t (*readl)(struct fmc_device *fmc, int offset);
> + void (*writel)(struct fmc_device *fmc, uint32_t value, int offset);
> + int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
> + int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
> + int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
> + char *name, int flags);
8<----
Subject: fmc: avoid readl/writel namespace conflict
The use of the 'readl' and 'writel' identifiers here causes build errors on
architectures where those are macros. This renames the fields to read32/write32
to avoid the problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/fmc/fmc-fakedev.c b/drivers/fmc/fmc-fakedev.c
index bec94ac..941d093 100644
--- a/drivers/fmc/fmc-fakedev.c
+++ b/drivers/fmc/fmc-fakedev.c
@@ -232,8 +232,8 @@ static int ff_validate(struct fmc_device *fmc, struct fmc_driver *drv)
static struct fmc_operations ff_fmc_operations = {
- .readl = ff_readl,
- .writel = ff_writel,
+ .read32 = ff_readl,
+ .write32 = ff_writel,
.reprogram = ff_reprogram,
.irq_request = ff_irq_request,
.read_ee = ff_read_ee,
diff --git a/include/linux/fmc.h b/include/linux/fmc.h
index a3c4985..a5f0aa5 100644
--- a/include/linux/fmc.h
+++ b/include/linux/fmc.h
@@ -129,8 +129,8 @@ struct fmc_gpio {
* the exception.
*/
struct fmc_operations {
- uint32_t (*readl)(struct fmc_device *fmc, int offset);
- void (*writel)(struct fmc_device *fmc, uint32_t value, int offset);
+ uint32_t (*read32)(struct fmc_device *fmc, int offset);
+ void (*write32)(struct fmc_device *fmc, uint32_t value, int offset);
int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
@@ -194,14 +194,14 @@ struct fmc_device {
*/
static inline uint32_t fmc_readl(struct fmc_device *fmc, int offset)
{
- if (unlikely(fmc->op->readl))
- return fmc->op->readl(fmc, offset);
+ if (unlikely(fmc->op->read32))
+ return fmc->op->read32(fmc, offset);
return readl(fmc->fpga_base + offset);
}
static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off)
{
- if (unlikely(fmc->op->writel))
- fmc->op->writel(fmc, val, off);
+ if (unlikely(fmc->op->write32))
+ fmc->op->write32(fmc, val, off);
else
writel(val, fmc->fpga_base + off);
}
next prev parent reply other threads:[~2013-06-19 10:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 7:13 [PATCH 0/8] Support for FMC carriers and mezzanines Alessandro Rubini
2013-06-12 7:13 ` [PATCH 1/8] FMC: create drivers/fmc and toplevel Kconfig question Alessandro Rubini
2013-06-17 23:17 ` Greg KH
2013-06-17 23:24 ` Alessandro Rubini
2013-06-17 23:35 ` Greg KH
2013-06-12 7:13 ` [PATCH 2/8] FMC: add needed headers Alessandro Rubini
2013-06-17 23:21 ` Greg KH
2013-06-17 23:29 ` Alessandro Rubini
2013-06-17 23:35 ` Greg KH
2013-06-19 10:49 ` Arnd Bergmann [this message]
2013-06-19 11:08 ` Alessandro Rubini
2013-06-12 7:13 ` [PATCH 3/8] FMC: add core bus driver Alessandro Rubini
2013-06-17 23:15 ` Greg KH
2013-06-17 23:16 ` Greg KH
2013-06-17 23:38 ` Alessandro Rubini
2013-06-18 8:36 ` Juan David Gonzalez Cobas
[not found] ` <CADDK0KdrVgmXN-TZw8E43JRNk5Wb_cfM6pUWaSxbJ49GU72cTg@mail.gmail.com>
2013-06-18 17:40 ` Greg KH
2013-06-18 19:52 ` Alessandro Rubini
2013-06-12 7:13 ` [PATCH 4/8] FMC: add documentation for the core Alessandro Rubini
2013-06-12 7:14 ` [PATCH 5/8] FMC: add a software carrier driver Alessandro Rubini
2013-06-17 23:19 ` Greg KH
2013-06-12 7:14 ` [PATCH 6/8] FMC: add a software mezzanine driver Alessandro Rubini
2013-06-17 23:20 ` Greg KH
2013-06-12 7:14 ` [PATCH 7/8] FMC: add a driver to write mezzanine EEPROM Alessandro Rubini
2013-06-12 7:14 ` [PATCH 8/8] FMC: add a char-device mezzanine driver Alessandro Rubini
-- strict thread matches above, loose matches on Subject: below --
2013-02-21 18:13 [PATCH RFC 0/8] drivers/fmc: bus support for ANSI-VITA 57.1 Alessandro Rubini
2013-02-21 18:13 ` [PATCH 2/8] FMC: add needed headers Alessandro Rubini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2530586.aQgWYlUvJa@wuerfel \
--to=arnd@arndb.de \
--cc=cota@braap.org \
--cc=gregkh@linuxfoundation.org \
--cc=juan.david.gonzalez.cobas@cern.ch \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=rubini@gnudd.com \
--cc=siglesias@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®