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