summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-08-31 00:12:13 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-08-31 00:12:13 -0700
commit5dbafd2326c4cbb6a62c5bb8cb6e248b13375836 (patch)
treebd68d6e2cc561d002dec6ded044b152de3659c95 /include/linux
parentb9bf6a33adefa9d32cbe584375c0991761f45281 (diff)
parent7fbfb09e7f56b4f234a11d38159d4448e904b9b2 (diff)
Merge bk://linux-dj.bkbits.net/agpgart
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h12
-rw-r--r--include/linux/device.h5
-rw-r--r--include/linux/fs.h23
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/ide.h40
-rw-r--r--include/linux/kdev_t.h15
-rw-r--r--include/linux/nfsd/nfsfh.h4
-rw-r--r--include/linux/nfsd/state.h10
-rw-r--r--include/linux/oprofile.h2
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pkt_sched.h2
-rw-r--r--include/linux/pm.h45
-rw-r--r--include/linux/pmu.h24
-rw-r--r--include/linux/serial_core.h3
-rw-r--r--include/linux/sonypi.h2
-rw-r--r--include/linux/sunrpc/timer.h16
-rw-r--r--include/linux/sunrpc/xprt.h6
-rw-r--r--include/linux/suspend.h31
-rw-r--r--include/linux/sysdev.h4
-rw-r--r--include/linux/tpqic02.h6
-rw-r--r--include/linux/tty.h2
21 files changed, 140 insertions, 115 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 3fd526160f1a..94a0f27e331c 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -373,6 +373,11 @@ extern int acpi_mp_config;
#define acpi_mp_config 0
+static inline int acpi_boot_init(void)
+{
+ return 0;
+}
+
#endif /*!CONFIG_ACPI_BOOT*/
@@ -423,6 +428,13 @@ int ec_write(u8 addr, u8 val);
int acpi_blacklisted(void);
+#else
+
+static inline int acpi_blacklisted(void)
+{
+ return 0;
+}
+
#endif /*CONFIG_ACPI*/
#endif /*_LINUX_ACPI_H*/
diff --git a/include/linux/device.h b/include/linux/device.h
index 7b49400adf31..8d6266f2e3c3 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -58,7 +58,8 @@ struct bus_type {
struct device * (*add) (struct device * parent, char * bus_id);
int (*hotplug) (struct device *dev, char **envp,
int num_envp, char *buffer, int buffer_size);
-
+ int (*suspend)(struct device * dev, u32 state);
+ int (*resume)(struct device * dev);
};
extern int bus_register(struct bus_type * bus);
@@ -372,8 +373,6 @@ extern struct bus_type platform_bus_type;
extern struct device legacy_bus;
/* drivers/base/power.c */
-extern int device_suspend(u32 state, u32 level);
-extern void device_resume(u32 level);
extern void device_shutdown(void);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a9e02e3dcdd8..108e53f176c9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -336,10 +336,8 @@ struct address_space {
};
struct block_device {
- struct list_head bd_hash;
- atomic_t bd_count;
- struct inode * bd_inode;
dev_t bd_dev; /* not a kdev_t - it's a search key */
+ struct inode * bd_inode; /* will die */
int bd_openers;
struct semaphore bd_sem; /* open/close mutex */
struct list_head bd_inodes;
@@ -347,10 +345,11 @@ struct block_device {
int bd_holders;
struct block_device * bd_contains;
unsigned bd_block_size;
- sector_t bd_offset;
+ struct hd_struct * bd_part;
unsigned bd_part_count;
int bd_invalidated;
struct gendisk * bd_disk;
+ struct list_head bd_list;
};
/*
@@ -468,6 +467,16 @@ static inline void i_size_write(struct inode *inode, loff_t i_size)
#endif
}
+static inline unsigned iminor(struct inode *inode)
+{
+ return minor(inode->i_rdev);
+}
+
+static inline unsigned imajor(struct inode *inode)
+{
+ return major(inode->i_rdev);
+}
+
struct fown_struct {
rwlock_t lock; /* protects pid, uid, euid fields */
int pid; /* pid or -pgrp where SIGIO should be sent */
@@ -1176,6 +1185,12 @@ extern int invalidate_partition(struct gendisk *, int);
unsigned long invalidate_mapping_pages(struct address_space *mapping,
pgoff_t start, pgoff_t end);
unsigned long invalidate_inode_pages(struct address_space *mapping);
+static inline void invalidate_remote_inode(struct inode *inode)
+{
+ if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
+ S_ISLNK(inode->i_mode))
+ invalidate_inode_pages(inode->i_mapping);
+}
extern void invalidate_inode_pages2(struct address_space *mapping);
extern void write_inode_now(struct inode *, int);
extern int filemap_fdatawrite(struct address_space *);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 3e4ef6b13683..623baf2fd239 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -197,7 +197,7 @@ extern void rand_initialize_disk(struct gendisk *disk);
static inline sector_t get_start_sect(struct block_device *bdev)
{
- return bdev->bd_offset;
+ return bdev->bd_part->start_sect;
}
static inline sector_t get_capacity(struct gendisk *disk)
{
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 82ca6da75b3f..a68f7871d3bb 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1241,23 +1241,6 @@ typedef struct ide_driver_s {
#define DRIVER(drive) ((drive)->driver)
extern int generic_ide_ioctl(struct block_device *, unsigned, unsigned long);
-extern int generic_ide_suspend(struct device *dev, u32 state, u32 level);
-extern int generic_ide_resume(struct device *dev, u32 level);
-
-/*
- * IDE modules.
- */
-#define IDE_CHIPSET_MODULE 0 /* not supported yet */
-#define IDE_PROBE_MODULE 1
-
-typedef int (ide_module_init_proc)(void);
-
-typedef struct ide_module_s {
- int type;
- ide_module_init_proc *init;
- void *info;
- struct ide_module_s *next;
-} ide_module_t;
typedef struct ide_devices_s {
char name[4]; /* hdX */
@@ -1276,8 +1259,7 @@ typedef struct ide_devices_s {
*/
#ifndef _IDE_C
extern ide_hwif_t ide_hwifs[]; /* master data repository */
-extern ide_module_t *ide_chipsets;
-extern ide_module_t *ide_probe;
+extern int (*ide_probe)(void);
extern ide_devices_t *idedisk;
extern ide_devices_t *idecd;
@@ -1774,8 +1756,6 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif);
extern void ide_hwif_release_regions(ide_hwif_t* hwif);
extern void ide_unregister (unsigned int index);
-extern int export_ide_init_queue(ide_drive_t *);
-extern u8 export_probe_for_drive(ide_drive_t *);
extern int probe_hwif_init(ide_hwif_t *);
static inline void *ide_get_hwifdata (ide_hwif_t * hwif)
@@ -1796,6 +1776,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate);
extern void ide_toggle_bounce(ide_drive_t *drive, int on);
extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
+typedef struct ide_pio_timings_s {
+ int setup_time; /* Address setup (ns) minimum */
+ int active_time; /* Active pulse (ns) minimum */
+ int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */
+} ide_pio_timings_t;
+
+typedef struct ide_pio_data_s {
+ u8 pio_mode;
+ u8 use_iordy;
+ u8 overridden;
+ u8 blacklisted;
+ unsigned int cycle_time;
+} ide_pio_data_t;
+
+extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
+extern const ide_pio_timings_t ide_pio_timings[6];
+
+
extern spinlock_t ide_lock;
extern struct semaphore ide_cfg_sem;
/*
diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h
index 337b7261247b..900a4a1e1282 100644
--- a/include/linux/kdev_t.h
+++ b/include/linux/kdev_t.h
@@ -90,23 +90,8 @@ static inline unsigned int kdev_val(kdev_t dev)
return dev.value;
}
-static inline kdev_t val_to_kdev(unsigned int val)
-{
- kdev_t dev;
- dev.value = val;
- return dev;
-}
-
-#define HASHDEV(dev) (kdev_val(dev))
#define NODEV (mk_kdev(0,0))
-static inline int kdev_same(kdev_t dev1, kdev_t dev2)
-{
- return dev1.value == dev2.value;
-}
-
-#define kdev_none(d1) (!kdev_val(d1))
-
/* Mask off the high bits for now.. */
#define minor(dev) ((dev).value & 0xff)
#define major(dev) (((dev).value >> KDEV_MINOR_BITS) & 0xff)
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 19f76c700f4d..d4d63cc8e5fa 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -294,8 +294,8 @@ fill_post_wcc(struct svc_fh *fhp)
/* how much do we care for accuracy with MinixFS? */
fhp->fh_post_blocks = (inode->i_size+511) >> 9;
}
- fhp->fh_post_rdev[0] = htonl((u32)major(inode->i_rdev));
- fhp->fh_post_rdev[1] = htonl((u32)minor(inode->i_rdev));
+ fhp->fh_post_rdev[0] = htonl((u32)imajor(inode));
+ fhp->fh_post_rdev[1] = htonl((u32)iminor(inode));
fhp->fh_post_atime = inode->i_atime;
fhp->fh_post_mtime = inode->i_mtime;
fhp->fh_post_ctime = inode->i_ctime;
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index 480eebab6993..66422a1c8277 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -113,21 +113,15 @@ struct nfs4_stateowner {
int so_confirmed; /* successful OPEN_CONFIRM? */
};
-typedef struct {
- u32 dev; /* super_block->s_dev */
- unsigned long ino;
- u32 generation;
-} nfs4_ino_desc_t;
-
/*
* nfs4_file: a file opened by some number of (open) nfs4_stateowners.
* o fi_perfile list is used to search for conflicting
* share_acces, share_deny on the file.
*/
struct nfs4_file {
- struct list_head fi_hash; /* hash by nfs4_ino_desc_t fields */
+ struct list_head fi_hash; /* hash by "struct inode *" */
struct list_head fi_perfile; /* list: nfs4_stateid */
- nfs4_ino_desc_t fi_ino;
+ struct inode *fi_inode;
u32 fi_id; /* used with stateowner->so_id
* for openstateid_hashtbl hash */
};
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index c2b4fd735f40..9555dd4d69fc 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -92,7 +92,7 @@ ssize_t oprofilefs_str_to_user(char const * str, char * buf, size_t count, loff_
* Convert an unsigned long value into ASCII and copy it to the user buffer @buf,
* updating *offset appropriately. Returns bytes written or -EFAULT.
*/
-ssize_t oprofilefs_ulong_to_user(unsigned long * val, char * buf, size_t count, loff_t * offset);
+ssize_t oprofilefs_ulong_to_user(unsigned long val, char * buf, size_t count, loff_t * offset);
/**
* Read an ASCII string for a number from a userspace buffer and fill *val on success.
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index dbb4139c8eb5..02cea0a5e938 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -798,6 +798,7 @@
#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030
#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032
#define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034
+#define PCI_DEVICE_ID_APPLE_KAUAI_ATA 0x003b
#define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e
#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index fec8ad62b567..d97edad0effc 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -45,7 +45,7 @@ struct tc_stats
struct tc_estimator
{
- char interval;
+ signed char interval;
unsigned char ewma_log;
};
diff --git a/include/linux/pm.h b/include/linux/pm.h
index e4c795f71cea..3017bdef5f03 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -186,9 +186,46 @@ static inline void pm_dev_idle(struct pm_dev *dev) {}
#endif /* CONFIG_PM */
+
+/*
+ * Callbacks for platform drivers to implement.
+ */
extern void (*pm_idle)(void);
extern void (*pm_power_off)(void);
+enum {
+ PM_SUSPEND_ON,
+ PM_SUSPEND_STANDBY,
+ PM_SUSPEND_MEM,
+ PM_SUSPEND_DISK,
+ PM_SUSPEND_MAX,
+};
+
+enum {
+ PM_DISK_FIRMWARE = 1,
+ PM_DISK_PLATFORM,
+ PM_DISK_SHUTDOWN,
+ PM_DISK_REBOOT,
+ PM_DISK_MAX,
+};
+
+
+struct pm_ops {
+ u32 pm_disk_mode;
+ int (*prepare)(u32 state);
+ int (*enter)(u32 state);
+ int (*finish)(u32 state);
+};
+
+extern void pm_set_ops(struct pm_ops *);
+
+extern int pm_suspend(u32 state);
+
+
+/*
+ * Device power management
+ */
+
struct device;
struct dev_pm_info {
@@ -203,10 +240,10 @@ struct dev_pm_info {
extern void device_pm_set_parent(struct device * dev, struct device * parent);
-extern int device_pm_suspend(u32 state);
-extern int device_pm_power_down(u32 state);
-extern void device_pm_power_up(void);
-extern void device_pm_resume(void);
+extern int device_suspend(u32 state);
+extern int device_power_down(u32 state);
+extern void device_power_up(void);
+extern void device_resume(void);
#endif /* __KERNEL__ */
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 9c9d40cf3309..bc331f946fec 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -33,6 +33,7 @@
#define PMU_CPU_SPEED 0x7d /* control CPU speed on some models */
#define PMU_SLEEP 0x7f /* put CPU to sleep */
#define PMU_POWER_EVENTS 0x8f /* Send power-event commands to PMU */
+#define PMU_I2C_CMD 0x9a /* I2C operations */
#define PMU_RESET 0xd0 /* reset CPU */
#define PMU_GET_BRIGHTBUTTON 0xd9 /* report brightness up/down pos */
#define PMU_GET_COVER 0xdc /* report cover open/closed */
@@ -69,6 +70,20 @@
* or via PMU_INT_ENVIRONMENT on core99 */
#define PMU_ENV_LID_CLOSED 0x01 /* The lid is closed */
+/* I2C related definitions */
+#define PMU_I2C_MODE_SIMPLE 0
+#define PMU_I2C_MODE_STDSUB 1
+#define PMU_I2C_MODE_COMBINED 2
+
+#define PMU_I2C_BUS_STATUS 0
+#define PMU_I2C_BUS_SYSCLK 1
+#define PMU_I2C_BUS_POWER 2
+
+#define PMU_I2C_STATUS_OK 0
+#define PMU_I2C_STATUS_DATAREAD 1
+#define PMU_I2C_STATUS_BUSY 0xfe
+
+
/* Kind of PMU (model) */
enum {
PMU_UNKNOWN,
@@ -127,6 +142,8 @@ extern int pmu_request(struct adb_request *req,
void (*done)(struct adb_request *), int nbytes, ...);
extern void pmu_poll(void);
+extern void pmu_poll_adb(void); /* For use by xmon */
+extern void pmu_wait_complete(struct adb_request *req);
/* For use before switching interrupts off for a long time;
* warning: not stackable
@@ -138,10 +155,17 @@ extern void pmu_enable_irled(int on);
extern void pmu_restart(void);
extern void pmu_shutdown(void);
+extern void pmu_unlock(void);
extern int pmu_present(void);
extern int pmu_get_model(void);
+extern int pmu_i2c_combined_read(int bus, int addr, int subaddr, u8* data, int len);
+extern int pmu_i2c_stdsub_write(int bus, int addr, int subaddr, u8* data, int len);
+extern int pmu_i2c_simple_read(int bus, int addr, u8* data, int len);
+extern int pmu_i2c_simple_write(int bus, int addr, u8* data, int len);
+
+
#ifdef CONFIG_PMAC_PBOOK
/*
* Stuff for putting the powerbook to sleep and waking it again.
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a7cb796c4deb..5bb8b174ca68 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -67,6 +67,9 @@
#define PORT_PC9861 45
#define PORT_PC9801_101 46
+/* Macintosh Zilog type numbers */
+#define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */
+#define PORT_PMAC_ZILOG 51
#ifdef __KERNEL__
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index d9ac90a87712..1ad9711e6aa2 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -94,6 +94,8 @@
#define SONYPI_EVENT_MEMORYSTICK_INSERT 54
#define SONYPI_EVENT_MEMORYSTICK_EJECT 55
#define SONYPI_EVENT_ANYBUTTON_RELEASED 56
+#define SONYPI_EVENT_BATTERY_INSERT 57
+#define SONYPI_EVENT_BATTERY_REMOVE 58
/* get/set brightness */
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h
index ff6bc599eeec..f2f2ffc4f2cd 100644
--- a/include/linux/sunrpc/timer.h
+++ b/include/linux/sunrpc/timer.h
@@ -15,7 +15,6 @@ struct rpc_rtt {
unsigned long timeo; /* default timeout value */
unsigned long srtt[5]; /* smoothed round trip time << 3 */
unsigned long sdrtt[5]; /* smoothed medium deviation of RTT */
- atomic_t ntimeouts; /* Global count of the number of timeouts */
};
@@ -23,19 +22,4 @@ extern void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo);
extern void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m);
extern unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer);
-static inline void rpc_inc_timeo(struct rpc_rtt *rt)
-{
- atomic_inc(&rt->ntimeouts);
-}
-
-static inline void rpc_clear_timeo(struct rpc_rtt *rt)
-{
- atomic_set(&rt->ntimeouts, 0);
-}
-
-static inline int rpc_ntimeo(struct rpc_rtt *rt)
-{
- return atomic_read(&rt->ntimeouts);
-}
-
#endif /* _LINUX_SUNRPC_TIMER_H */
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index b360e54f894a..e29381edeaea 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -98,6 +98,10 @@ struct rpc_rqst {
struct list_head rq_list;
+ struct xdr_buf rq_private_buf; /* The receive buffer
+ * used in the softirq.
+ */
+
/*
* For authentication (e.g. auth_des)
*/
@@ -111,7 +115,7 @@ struct rpc_rqst {
unsigned long rq_xtime; /* when transmitted */
int rq_ntimeo;
- int rq_nresend;
+ int rq_ntrans;
};
#define rq_svec rq_snd_buf.head
#define rq_slen rq_snd_buf.len
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 28788d8a65ff..132db86c961a 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -8,8 +8,7 @@
#include <linux/notifier.h>
#include <linux/config.h>
#include <linux/init.h>
-
-extern unsigned char software_suspend_enabled;
+#include <linux/pm.h>
#ifdef CONFIG_SOFTWARE_SUSPEND
/* page backup entry */
@@ -46,22 +45,9 @@ extern int shrink_mem(void);
/* mm/page_alloc.c */
extern void drain_local_pages(void);
-/* kernel/suspend.c */
-extern int software_suspend(void);
-
-extern int register_suspend_notifier(struct notifier_block *);
-extern int unregister_suspend_notifier(struct notifier_block *);
-
extern unsigned int nr_copy_pages __nosavedata;
extern suspend_pagedir_t *pagedir_nosave __nosavedata;
-/* Communication between kernel/suspend.c and arch/i386/suspend.c */
-
-extern void do_magic_resume_1(void);
-extern void do_magic_resume_2(void);
-extern void do_magic_suspend_1(void);
-extern void do_magic_suspend_2(void);
-
/* Communication between acpi and arch/i386/suspend.c */
extern void do_suspend_lowlevel(int resume);
@@ -72,32 +58,17 @@ static inline int software_suspend(void)
{
return -EPERM;
}
-#define register_suspend_notifier(a) do { } while(0)
-#define unregister_suspend_notifier(a) do { } while(0)
#endif /* CONFIG_SOFTWARE_SUSPEND */
#ifdef CONFIG_PM
extern void refrigerator(unsigned long);
-extern int freeze_processes(void);
-extern void thaw_processes(void);
-
-extern int pm_prepare_console(void);
-extern void pm_restore_console(void);
#else
static inline void refrigerator(unsigned long flag)
{
}
-static inline int freeze_processes(void)
-{
- return 0;
-}
-static inline void thaw_processes(void)
-{
-
-}
#endif /* CONFIG_PM */
#endif /* _LINUX_SWSUSP_H */
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h
index 4bc3e22b5104..2a90db8d41de 100644
--- a/include/linux/sysdev.h
+++ b/include/linux/sysdev.h
@@ -31,10 +31,8 @@ struct sysdev_class {
/* Default operations for these types of devices */
int (*shutdown)(struct sys_device *);
- int (*save)(struct sys_device *, u32 state);
int (*suspend)(struct sys_device *, u32 state);
int (*resume)(struct sys_device *);
- int (*restore)(struct sys_device *);
struct kset kset;
};
@@ -52,10 +50,8 @@ struct sysdev_driver {
int (*add)(struct sys_device *);
int (*remove)(struct sys_device *);
int (*shutdown)(struct sys_device *);
- int (*save)(struct sys_device *, u32 state);
int (*suspend)(struct sys_device *, u32 state);
int (*resume)(struct sys_device *);
- int (*restore)(struct sys_device *);
};
diff --git a/include/linux/tpqic02.h b/include/linux/tpqic02.h
index f980d4ff01fe..f0dfcfa56273 100644
--- a/include/linux/tpqic02.h
+++ b/include/linux/tpqic02.h
@@ -587,10 +587,10 @@
* |___________________ Reserved for diagnostics during debugging.
*/
-#define TP_REWCLOSE(d) ((minor(d)&0x01) == 1) /* rewind bit */
+#define TP_REWCLOSE(d) ((d)&1) /* rewind bit */
/* rewind is only done if data has been transferred */
-#define TP_DENS(dev) ((minor(dev) >> 1) & 0x07) /* tape density */
-#define TP_UNIT(dev) ((minor(dev) >> 4) & 0x07) /* unit number */
+#define TP_DENS(d) (((d) >> 1) & 0x07) /* tape density */
+#define TP_UNIT(d) (((d) >> 4) & 0x07) /* unit number */
/* print excessive diagnostics */
#define TP_DIAGS(dev) (QIC02_TAPE_DEBUG & TPQD_DIAGS)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index aa10cff1871c..205e27af55a2 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -367,7 +367,7 @@ extern int espserial_init(void);
extern int macserial_init(void);
extern int a2232board_init(void);
-extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device,
+extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
const char *routine);
extern char *tty_name(struct tty_struct *tty, char *buf);
extern void tty_wait_until_sent(struct tty_struct * tty, long timeout);