Commit da5f761d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] janitor: media: use kernel min/max

From: "Randy.Dunlap" <rddunlap@osdl.org>

From: Michael Veeck <michael.veeck@gmx.net>

Remove unnecessary min/max macros and changes calls to use kernel.h macros
instead.
parent a30bfc8e
...@@ -122,10 +122,6 @@ struct saa5249_device ...@@ -122,10 +122,6 @@ struct saa5249_device
#define FALSE 0 #define FALSE 0
#define TRUE 1 #define TRUE 1
#endif #endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#define RESCHED do { cond_resched(); } while(0) #define RESCHED do { cond_resched(); } while(0)
...@@ -518,8 +514,8 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file, ...@@ -518,8 +514,8 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
{ {
int len; int len;
char buf[16]; char buf[16];
start = MAX(req->start, 32); start = max(req->start, 32);
end = MIN(req->end, 39); end = min(req->end, 39);
len=end-start+1; len=end-start+1;
if (i2c_senddata(t, 8, 0, 0, start, -1) || if (i2c_senddata(t, 8, 0, 0, start, -1) ||
i2c_getdata(t, len, buf)) i2c_getdata(t, len, buf))
...@@ -532,8 +528,8 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file, ...@@ -532,8 +528,8 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
{ {
char buf[32]; char buf[32];
int len; int len;
start = MAX(req->start, 7); start = max(req->start, 7);
end = MIN(req->end, 31); end = min(req->end, 31);
len=end-start+1; len=end-start+1;
if (i2c_senddata(t, 8, 0, 0, start, -1) || if (i2c_senddata(t, 8, 0, 0, start, -1) ||
i2c_getdata(t, len, buf)) i2c_getdata(t, len, buf))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment