From: Takashi Iwai <tiwai@suse.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] fm801: introduce macros to access the hardware
Date: Mon, 28 Apr 2014 12:20:35 +0200 [thread overview]
Message-ID: <s5hy4ypbvrg.wl%tiwai@suse.de> (raw)
In-Reply-To: <1398672030-29565-1-git-send-email-andy.shevchenko@gmail.com>
At Mon, 28 Apr 2014 11:00:29 +0300,
Andy Shevchenko wrote:
>
> It will help to maintain HW accessors and, for example, switch from the
> direct I/O to MMIO which is more convenient for PCI devices.
>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
> sound/pci/fm801.c | 131 ++++++++++++++++++++++++++++--------------------------
> 1 file changed, 68 insertions(+), 63 deletions(-)
>
> diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
> index db18cca..8418484 100644
> --- a/sound/pci/fm801.c
> +++ b/sound/pci/fm801.c
> @@ -23,6 +23,7 @@
> #include <linux/delay.h>
> #include <linux/init.h>
> #include <linux/interrupt.h>
> +#include <linux/io.h>
> #include <linux/pci.h>
> #include <linux/slab.h>
> #include <linux/module.h>
> @@ -34,8 +35,6 @@
> #include <sound/opl3.h>
> #include <sound/initval.h>
>
> -#include <asm/io.h>
> -
> #ifdef CONFIG_SND_FM801_TEA575X_BOOL
> #include <media/tea575x.h>
> #endif
> @@ -80,7 +79,10 @@ MODULE_PARM_DESC(radio_nr, "Radio device numbers");
> * Direct registers
> */
>
> -#define FM801_REG(chip, reg) (chip->port + FM801_##reg)
> +#define fm801_writew(v,chip,reg) outw((v), chip->port + FM801_##reg)
> +#define fm801_readw(chip,reg) inw(chip->port + FM801_##reg)
> +
> +#define fm801_writel(v,chip,reg) outl((v), chip->port + FM801_##reg)
IMO, it's better in a form like fm801_writel(chip, reg, value)
thanks,
Takashi
next prev parent reply other threads:[~2014-04-28 10:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 8:00 [PATCH 1/2] fm801: introduce macros to access the hardware Andy Shevchenko
2014-04-28 8:00 ` [PATCH 2/2] fm801: introduce __is_ready()/__is_valid() helpers Andy Shevchenko
2014-04-28 10:25 ` Takashi Iwai
2014-04-28 11:26 ` Andy Shevchenko
2014-04-28 10:20 ` Takashi Iwai [this message]
2014-04-28 11:21 ` [PATCH 1/2] fm801: introduce macros to access the hardware Andy Shevchenko
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=s5hy4ypbvrg.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andy.shevchenko@gmail.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