Commit 7e7a44c1 authored by Dave Jones's avatar Dave Jones

[PATCH] kdev_t fixes.

The usual search and replace type operations from various people
to various drivers..
parent 6a9d4e3d
......@@ -217,7 +217,7 @@ static int
gpio_open(struct inode *inode, struct file *filp)
{
struct gpio_private *priv;
int p = MINOR(inode->i_rdev);
int p = minor(inode->i_rdev);
if (p >= NUM_PORTS && p != LEDS)
return -EINVAL;
......
......@@ -5295,7 +5295,7 @@ static int DAC960_Open(Inode_T *Inode, File_T *File)
DAC960_ComputeGenericDiskInfo(Controller);
DAC960_RegisterDisk(Controller, LogicalDriveNumber);
}
if (Controller->GenericDiskInfo.sizes[MINOR(Inode->i_rdev)] == 0)
if (Controller->GenericDiskInfo.sizes[minor(Inode->i_rdev)] == 0)
return -ENXIO;
/*
Increment Controller and Logical Drive Usage Counts.
......
......@@ -141,7 +141,7 @@ loff_t i2cdev_lseek (struct file *file, loff_t offset, int origin)
#ifdef DEBUG
struct inode *inode = file->f_dentry->d_inode;
printk("i2c-dev.o: i2c-%d lseek to %ld bytes relative to %d.\n",
MINOR(inode->i_rdev),(long) offset,origin);
minor(inode->i_rdev),(long) offset,origin);
#endif /* DEBUG */
return -ESPIPE;
}
......@@ -165,7 +165,7 @@ static ssize_t i2cdev_read (struct file *file, char *buf, size_t count,
return -ENOMEM;
#ifdef DEBUG
printk("i2c-dev.o: i2c-%d reading %d bytes.\n",MINOR(inode->i_rdev),
printk("i2c-dev.o: i2c-%d reading %d bytes.\n",minor(inode->i_rdev),
count);
#endif
......@@ -197,7 +197,7 @@ static ssize_t i2cdev_write (struct file *file, const char *buf, size_t count,
}
#ifdef DEBUG
printk("i2c-dev.o: i2c-%d writing %d bytes.\n",MINOR(inode->i_rdev),
printk("i2c-dev.o: i2c-%d writing %d bytes.\n",minor(inode->i_rdev),
count);
#endif
ret = i2c_master_send(client,tmp,count);
......@@ -218,7 +218,7 @@ int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
#ifdef DEBUG
printk("i2c-dev.o: i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",
MINOR(inode->i_rdev),cmd, arg);
minor(inode->i_rdev),cmd, arg);
#endif /* DEBUG */
switch ( cmd ) {
......
......@@ -56,7 +56,6 @@
#define PRINTD(level, card, fmt, args...) do {} while (0)
#endif
static struct hpsb_host_driver *lynx_driver;
static unsigned int card_id;
......@@ -636,7 +635,7 @@ static void aux_setup_pcls(struct ti_lynx *lynx)
static int mem_open(struct inode *inode, struct file *file)
{
int cid = MINOR(inode->i_rdev);
int cid = minor(inode->i_rdev);
enum { t_rom, t_aux, t_ram } type;
struct memdata *md;
......
......@@ -195,7 +195,7 @@ static int ftl_ioctl(struct inode *inode, struct file *file,
u_int cmd, u_long arg);
static int ftl_open(struct inode *inode, struct file *file);
static release_t ftl_close(struct inode *inode, struct file *file);
static int ftl_reread_partitions(int minor);
static int ftl_reread_partitions(kdev_t dev);
static void ftl_erase_callback(struct erase_info *done);
......@@ -842,7 +842,7 @@ static u_int32_t find_free(partition_t *part)
static int ftl_open(struct inode *inode, struct file *file)
{
int minor = MINOR(inode->i_rdev);
int minor = minor(inode->i_rdev);
partition_t *partition;
if (minor>>4 >= MAX_MTD_DEVICES)
......@@ -878,7 +878,7 @@ static int ftl_open(struct inode *inode, struct file *file)
static release_t ftl_close(struct inode *inode, struct file *file)
{
int minor = MINOR(inode->i_rdev);
int minor = minor(inode->i_rdev);
partition_t *part = myparts[minor >> 4];
int i;
......@@ -1114,7 +1114,7 @@ static int ftl_ioctl(struct inode *inode, struct file *file,
u_int cmd, u_long arg)
{
struct hd_geometry *geo = (struct hd_geometry *)arg;
int ret = 0, minor = MINOR(inode->i_rdev);
int ret = 0, minor = minor(inode->i_rdev);
partition_t *part= myparts[minor >> 4];
u_long sect;
......@@ -1139,7 +1139,7 @@ static int ftl_ioctl(struct inode *inode, struct file *file,
ret = put_user((u64)ftl_hd[minor].nr_sects << 9, (u64 *)arg);
break;
case BLKRRPART:
ret = ftl_reread_partitions(minor);
ret = ftl_reread_partitions(inode->i_rdev);
break;
case BLKROSET:
case BLKROGET:
......@@ -1161,7 +1161,7 @@ static int ftl_ioctl(struct inode *inode, struct file *file,
static int ftl_reread_partitions(kdev_t dev)
{
int minor = MINOR(dev);
int minor = minor(dev);
partition_t *part = myparts[minor >> 4];
int res;
......@@ -1197,7 +1197,7 @@ static void do_ftl_request(request_arg_t)
// sti();
INIT_REQUEST;
minor = MINOR(CURRENT->rq_dev);
minor = minor(CURRENT->rq_dev);
part = myparts[minor >> 4];
if (part) {
......
......@@ -1595,7 +1595,7 @@ static int lmLogFileSystem(log_t * log, dev_t fsdev, int activate)
return rc;
logsuper = (logsuper_t *) bpsuper->l_ldata;
bit = MINOR(fsdev);
bit = minor(fsdev);
word = bit / 32;
bit -= 32 * word;
if (activate)
......
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