summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-01-06 08:16:04 -0200
committerWilly Tarreau <w@1wt.eu>2011-04-30 16:52:57 +0200
commitafa75eeb4c55f00a3d0a92033c390bcf9c8e2560 (patch)
tree6ae7c1c8de7681287694e589d6acec92e75c5943 /drivers/media
parent3f51182e8c7a3dc5415f4b31811f1fa1ab4d27e9 (diff)
radio-aimslab.c: Fix gcc 4.5+ bug
commit e3c92215198cb6aa00ad38db2780faa6b72e0a3f upstream. gcc 4.5+ doesn't properly evaluate some inlined expressions. A previous patch were proposed by Andrew Morton using noinline. However, the entire inlined function is bogus, so let's just remove it and be happy. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/radio/radio-aimslab.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
index 1f064f4b32df..f17c89789b57 100644
--- a/drivers/media/radio/radio-aimslab.c
+++ b/drivers/media/radio/radio-aimslab.c
@@ -31,7 +31,6 @@
#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* request_region */
-#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev2.h> /* kernel radio structs */
@@ -60,27 +59,17 @@ struct rt_device
/* local things */
-static void sleep_delay(long n)
-{
- /* Sleep nicely for 'n' uS */
- int d=n/msecs_to_jiffies(1000);
- if(!d)
- udelay(n);
- else
- msleep(jiffies_to_msecs(d));
-}
-
static void rt_decvol(void)
{
outb(0x58, io); /* volume down + sigstr + on */
- sleep_delay(100000);
+ msleep(100);
outb(0xd8, io); /* volume steady + sigstr + on */
}
static void rt_incvol(void)
{
outb(0x98, io); /* volume up + sigstr + on */
- sleep_delay(100000);
+ msleep(100);
outb(0xd8, io); /* volume steady + sigstr + on */
}
@@ -109,7 +98,7 @@ static int rt_setvol(struct rt_device *dev, int vol)
if(vol == 0) { /* volume = 0 means mute the card */
outb(0x48, io); /* volume down but still "on" */
- sleep_delay(2000000); /* make sure it's totally down */
+ msleep(2000); /* make sure it's totally down */
outb(0xd0, io); /* volume steady, off */
dev->curvol = 0; /* track the volume state! */
mutex_unlock(&lock);
@@ -144,7 +133,7 @@ static void send_0_byte(int port, struct rt_device *dev)
outb_p(128+64+16+8+ 1, port); /* on + wr-enable + data low */
outb_p(128+64+16+8+2+1, port); /* clock */
}
- sleep_delay(1000);
+ msleep(1);
}
static void send_1_byte(int port, struct rt_device *dev)
@@ -158,7 +147,7 @@ static void send_1_byte(int port, struct rt_device *dev)
outb_p(128+64+16+8+4+2+1, port); /* clock */
}
- sleep_delay(1000);
+ msleep(1);
}
static int rt_setfreq(struct rt_device *dev, unsigned long freq)
@@ -440,7 +429,7 @@ static int __init rtrack_init(void)
/* this ensures that the volume is all the way down */
outb(0x48, io); /* volume down but still "on" */
- sleep_delay(2000000); /* make sure it's totally down */
+ msleep(2000); /* make sure it's totally down */
outb(0xc0, io); /* steady volume, mute card */
rtrack_unit.curvol = 0;