Skip to content

Commit

Permalink
ASoC: imx-audmux: Use uintptr_t for port numbers
Browse files Browse the repository at this point in the history
Since we pass the port number through file private data for debugfs we cast
it to and from a pointer so use uintptr_t in order to ensure that the
types are compatible, avoiding warnings on 64 bit platforms where pointers
are 64 bit and unsigned integers 32 bit.

Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Aug 4, 2014
1 parent 7171511 commit e5f8976
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/fsl/imx-audmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
{
ssize_t ret;
char *buf;
int port = (int)file->private_data;
uintptr_t port = (uintptr_t)file->private_data;
u32 pdcr, ptcr;

if (audmux_clk) {
Expand Down Expand Up @@ -147,7 +147,7 @@ static const struct file_operations audmux_debugfs_fops = {

static void audmux_debugfs_init(void)
{
int i;
uintptr_t i;
char buf[20];

audmux_debugfs_root = debugfs_create_dir("audmux", NULL);
Expand All @@ -157,10 +157,10 @@ static void audmux_debugfs_init(void)
}

for (i = 0; i < MX31_AUDMUX_PORT7_SSI_PINS_7 + 1; i++) {
snprintf(buf, sizeof(buf), "ssi%d", i);
snprintf(buf, sizeof(buf), "ssi%lu", i);
if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
(void *)i, &audmux_debugfs_fops))
pr_warning("Failed to create AUDMUX port %d debugfs file\n",
pr_warning("Failed to create AUDMUX port %lu debugfs file\n",
i);
}
}
Expand Down

0 comments on commit e5f8976

Please sign in to comment.