diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 9 | ||||
| -rw-r--r-- | include/linux/device.h | 5 | ||||
| -rw-r--r-- | include/linux/genhd.h | 2 | ||||
| -rw-r--r-- | include/linux/isdn.h | 9 | ||||
| -rw-r--r-- | include/linux/isdn/capilli.h | 2 | ||||
| -rw-r--r-- | include/linux/kernel.h | 2 | ||||
| -rw-r--r-- | include/linux/miscdevice.h | 5 | ||||
| -rw-r--r-- | include/linux/page-flags.h | 2 | ||||
| -rw-r--r-- | include/linux/rtc.h | 1 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 2 | ||||
| -rw-r--r-- | include/linux/usb.h | 2 |
11 files changed, 33 insertions, 8 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 99dbf0d24eaf..9c7e6d86e810 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -12,6 +12,8 @@ #include <linux/wait.h> #include <linux/mempool.h> #include <linux/bio.h> +#include <linux/module.h> +#include <linux/stringify.h> #include <asm/scatterlist.h> @@ -671,6 +673,11 @@ void kblockd_flush(void); } \ ) #endif - + +#define MODULE_ALIAS_BLOCKDEV(major,minor) \ + MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) +#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ + MODULE_ALIAS("block-major-" __stringify(major) "-*") + #endif diff --git a/include/linux/device.h b/include/linux/device.h index 8d6266f2e3c3..96043c0f46c5 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -398,4 +398,9 @@ extern void firmware_unregister(struct subsystem *); #define dev_warn(dev, format, arg...) \ dev_printk(KERN_WARNING , dev , format , ## arg) +/* Create alias, so I can be autoloaded. */ +#define MODULE_ALIAS_CHARDEV(major,minor) \ + MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) +#define MODULE_ALIAS_CHARDEV_MAJOR(major) \ + MODULE_ALIAS("char-major-" __stringify(major) "-*") #endif /* _DEVICE_H_ */ diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 460ef0362ab5..13e0933ccbc7 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -75,7 +75,6 @@ struct disk_stats { unsigned read_merges, write_merges; unsigned read_ticks, write_ticks; unsigned io_ticks; - int in_flight; unsigned time_in_queue; }; @@ -101,6 +100,7 @@ struct gendisk { unsigned sync_io; /* RAID */ unsigned long stamp, stamp_idle; + int in_flight; #ifdef CONFIG_SMP struct disk_stats *dkstats; #else diff --git a/include/linux/isdn.h b/include/linux/isdn.h index ecd0f5394e9e..35a2ef6e2452 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -258,13 +258,13 @@ typedef struct { * variables. Of course, we need to check skb_headroom prior to * any access. */ -typedef struct isdn_audio_skb { +typedef struct _isdnaudio_header { unsigned short dle_count; unsigned char lock; -} isdn_audio_skb; +} isdnaudio_header; -#define ISDN_AUDIO_SKB_DLECOUNT(skb) (((isdn_audio_skb*)skb->head)->dle_count) -#define ISDN_AUDIO_SKB_LOCK(skb) (((isdn_audio_skb*)skb->head)->lock) +#define ISDN_AUDIO_SKB_DLECOUNT(skb) (((isdnaudio_header*)skb->head)->dle_count) +#define ISDN_AUDIO_SKB_LOCK(skb) (((isdnaudio_header*)skb->head)->lock) #endif /* Private data of AT-command-interpreter */ @@ -291,6 +291,7 @@ typedef struct atemu { /* Private data (similar to async_struct in <linux/serial.h>) */ typedef struct modem_info { int magic; + struct module *owner; int flags; /* defined in tty.h */ int x_char; /* xon/xoff character */ int mcr; /* Modem control register */ diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h index cf501356aba4..d4747a9cee9c 100644 --- a/include/linux/isdn/capilli.h +++ b/include/linux/isdn/capilli.h @@ -54,7 +54,7 @@ struct capi_ctr { int count, int *eof, struct capi_ctr *card); /* filled in before calling ready callback */ - u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ + u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ capi_version version; /* CAPI_GET_VERSION */ capi_profile profile; /* CAPI_GET_PROFILE */ u8 serial[CAPI_SERIAL_LEN]; /* CAPI_GET_SERIAL */ diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b0aebfeda888..b2d17ea0dac0 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -52,8 +52,10 @@ struct completion; #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line); #define might_sleep() __might_sleep(__FILE__, __LINE__) +#define might_sleep_if(cond) do { if (unlikely(cond)) might_sleep(); } while (0) #else #define might_sleep() do {} while(0) +#define might_sleep_if(cond) do {} while (0) #endif extern struct notifier_block *panic_notifier_list; diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 159f8ab3df80..23b095889111 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -1,5 +1,7 @@ #ifndef _LINUX_MISCDEVICE_H #define _LINUX_MISCDEVICE_H +#include <linux/module.h> +#include <linux/major.h> #define BUSMOUSE_MINOR 0 #define PSMOUSE_MINOR 1 @@ -48,4 +50,7 @@ struct miscdevice extern int misc_register(struct miscdevice * misc); extern int misc_deregister(struct miscdevice * misc); +#define MODULE_ALIAS_MISCDEV(minor) \ + MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) \ + "-" __stringify(minor)) #endif diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index d4fd6bb3ca43..006fde0295d5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -191,6 +191,8 @@ extern void get_full_page_state(struct page_state *ret); #define PageSlab(page) test_bit(PG_slab, &(page)->flags) #define SetPageSlab(page) set_bit(PG_slab, &(page)->flags) #define ClearPageSlab(page) clear_bit(PG_slab, &(page)->flags) +#define TestClearPageSlab(page) test_and_clear_bit(PG_slab, &(page)->flags) +#define TestSetPageSlab(page) test_and_set_bit(PG_slab, &(page)->flags) #ifdef CONFIG_HIGHMEM #define PageHighMem(page) test_bit(PG_highmem, &(page)->flags) diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 27c38b240736..e1aaf1fac8e0 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -101,6 +101,7 @@ typedef struct rtc_task { int rtc_register(rtc_task_t *task); int rtc_unregister(rtc_task_t *task); int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); +void rtc_get_rtc_time(struct rtc_time *rtc_tm); #endif /* __KERNEL__ */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a372186cb6d6..4b5f057f8bfb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -389,6 +389,7 @@ static inline int skb_shared(struct sk_buff *skb) */ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) { + might_sleep_if(pri & __GFP_WAIT); if (skb_shared(skb)) { struct sk_buff *nskb = skb_clone(skb, pri); kfree_skb(skb); @@ -419,6 +420,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) */ static inline struct sk_buff *skb_unshare(struct sk_buff *skb, int pri) { + might_sleep_if(pri & __GFP_WAIT); if (skb_cloned(skb)) { struct sk_buff *nskb = skb_copy(skb, pri); kfree_skb(skb); /* Free our shared copy */ diff --git a/include/linux/usb.h b/include/linux/usb.h index 471c37f5188b..a20b33d953aa 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -329,7 +329,7 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) { int actual; actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); - return (actual >= size) ? -1 : actual; + return (actual >= (int)size) ? -1 : actual; } /*-------------------------------------------------------------------------*/ |
