diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:05:51 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:05:51 -0500 |
| commit | 06991c28f37ad68e5c03777f5c3b679b56e3dac1 (patch) | |
| tree | 4be75788e21c3c644fe6d39abf47693a171cf4f8 /include/linux | |
| parent | 460dc1eecf37263c8e3b17685ef236f0d236facb (diff) | |
| parent | 74fef7a8fd1d2bd94f925d6638bb4c3049e7c381 (diff) | |
Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core patches from Greg Kroah-Hartman:
"Here is the big driver core merge for 3.9-rc1
There are two major series here, both of which touch lots of drivers
all over the kernel, and will cause you some merge conflicts:
- add a new function called devm_ioremap_resource() to properly be
able to check return values.
- remove CONFIG_EXPERIMENTAL
Other than those patches, there's not much here, some minor fixes and
updates"
Fix up trivial conflicts
* tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
base: memory: fix soft/hard_offline_page permissions
drivercore: Fix ordering between deferred_probe and exiting initcalls
backlight: fix class_find_device() arguments
TTY: mark tty_get_device call with the proper const values
driver-core: constify data for class_find_device()
firmware: Ignore abort check when no user-helper is used
firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
firmware: Make user-mode helper optional
firmware: Refactoring for splitting user-mode helper code
Driver core: treat unregistered bus_types as having no devices
watchdog: Convert to devm_ioremap_resource()
thermal: Convert to devm_ioremap_resource()
spi: Convert to devm_ioremap_resource()
power: Convert to devm_ioremap_resource()
mtd: Convert to devm_ioremap_resource()
mmc: Convert to devm_ioremap_resource()
mfd: Convert to devm_ioremap_resource()
media: Convert to devm_ioremap_resource()
iommu: Convert to devm_ioremap_resource()
drm: Convert to devm_ioremap_resource()
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/debugfs.h | 2 | ||||
| -rw-r--r-- | include/linux/device.h | 5 | ||||
| -rw-r--r-- | include/linux/dynamic_debug.h | 11 | ||||
| -rw-r--r-- | include/linux/platform_device.h | 18 | ||||
| -rw-r--r-- | include/linux/power_supply.h | 2 | ||||
| -rw-r--r-- | include/linux/printk.h | 17 | ||||
| -rw-r--r-- | include/linux/rtc.h | 2 |
7 files changed, 52 insertions, 5 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 66c434f5dd1e..63f2465807d4 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
| @@ -33,7 +33,7 @@ struct debugfs_reg32 { | |||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | struct debugfs_regset32 { | 35 | struct debugfs_regset32 { |
| 36 | struct debugfs_reg32 *regs; | 36 | const struct debugfs_reg32 *regs; |
| 37 | int nregs; | 37 | int nregs; |
| 38 | void __iomem *base; | 38 | void __iomem *base; |
| 39 | }; | 39 | }; |
diff --git a/include/linux/device.h b/include/linux/device.h index 001f6637aa47..9d6464ea99c6 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -396,8 +396,8 @@ extern int class_for_each_device(struct class *class, struct device *start, | |||
| 396 | void *data, | 396 | void *data, |
| 397 | int (*fn)(struct device *dev, void *data)); | 397 | int (*fn)(struct device *dev, void *data)); |
| 398 | extern struct device *class_find_device(struct class *class, | 398 | extern struct device *class_find_device(struct class *class, |
| 399 | struct device *start, void *data, | 399 | struct device *start, const void *data, |
| 400 | int (*match)(struct device *, void *)); | 400 | int (*match)(struct device *, const void *)); |
| 401 | 401 | ||
| 402 | struct class_attribute { | 402 | struct class_attribute { |
| 403 | struct attribute attr; | 403 | struct attribute attr; |
| @@ -574,6 +574,7 @@ extern int devres_release_group(struct device *dev, void *id); | |||
| 574 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); | 574 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); |
| 575 | extern void devm_kfree(struct device *dev, void *p); | 575 | extern void devm_kfree(struct device *dev, void *p); |
| 576 | 576 | ||
| 577 | void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); | ||
| 577 | void __iomem *devm_request_and_ioremap(struct device *dev, | 578 | void __iomem *devm_request_and_ioremap(struct device *dev, |
| 578 | struct resource *res); | 579 | struct resource *res); |
| 579 | 580 | ||
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 6dd4787a798a..2fe93b26b42f 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -95,6 +95,17 @@ do { \ | |||
| 95 | ##__VA_ARGS__); \ | 95 | ##__VA_ARGS__); \ |
| 96 | } while (0) | 96 | } while (0) |
| 97 | 97 | ||
| 98 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | ||
| 99 | groupsize, buf, len, ascii) \ | ||
| 100 | do { \ | ||
| 101 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, \ | ||
| 102 | __builtin_constant_p(prefix_str) ? prefix_str : "hexdump");\ | ||
| 103 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | ||
| 104 | print_hex_dump(KERN_DEBUG, prefix_str, \ | ||
| 105 | prefix_type, rowsize, groupsize, \ | ||
| 106 | buf, len, ascii); \ | ||
| 107 | } while (0) | ||
| 108 | |||
| 98 | #else | 109 | #else |
| 99 | 110 | ||
| 100 | #include <linux/string.h> | 111 | #include <linux/string.h> |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index a9ded9a3c175..c082c71f7225 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -204,6 +204,24 @@ static inline void platform_set_drvdata(struct platform_device *pdev, void *data | |||
| 204 | module_driver(__platform_driver, platform_driver_register, \ | 204 | module_driver(__platform_driver, platform_driver_register, \ |
| 205 | platform_driver_unregister) | 205 | platform_driver_unregister) |
| 206 | 206 | ||
| 207 | /* module_platform_driver_probe() - Helper macro for drivers that don't do | ||
| 208 | * anything special in module init/exit. This eliminates a lot of | ||
| 209 | * boilerplate. Each module may only use this macro once, and | ||
| 210 | * calling it replaces module_init() and module_exit() | ||
| 211 | */ | ||
| 212 | #define module_platform_driver_probe(__platform_driver, __platform_probe) \ | ||
| 213 | static int __init __platform_driver##_init(void) \ | ||
| 214 | { \ | ||
| 215 | return platform_driver_probe(&(__platform_driver), \ | ||
| 216 | __platform_probe); \ | ||
| 217 | } \ | ||
| 218 | module_init(__platform_driver##_init); \ | ||
| 219 | static void __exit __platform_driver##_exit(void) \ | ||
| 220 | { \ | ||
| 221 | platform_driver_unregister(&(__platform_driver)); \ | ||
| 222 | } \ | ||
| 223 | module_exit(__platform_driver##_exit); | ||
| 224 | |||
| 207 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | 225 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, |
| 208 | int (*probe)(struct platform_device *), | 226 | int (*probe)(struct platform_device *), |
| 209 | struct resource *res, unsigned int n_res, | 227 | struct resource *res, unsigned int n_res, |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 25c0982eb9b1..002a99f96331 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -226,7 +226,7 @@ struct power_supply_info { | |||
| 226 | int use_for_apm; | 226 | int use_for_apm; |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | extern struct power_supply *power_supply_get_by_name(char *name); | 229 | extern struct power_supply *power_supply_get_by_name(const char *name); |
| 230 | extern void power_supply_changed(struct power_supply *psy); | 230 | extern void power_supply_changed(struct power_supply *psy); |
| 231 | extern int power_supply_am_i_supplied(struct power_supply *psy); | 231 | extern int power_supply_am_i_supplied(struct power_supply *psy); |
| 232 | extern int power_supply_set_battery_charged(struct power_supply *psy); | 232 | extern int power_supply_set_battery_charged(struct power_supply *psy); |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 86c4b6294713..5bef3045218e 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -318,8 +318,13 @@ extern void hex_dump_to_buffer(const void *buf, size_t len, | |||
| 318 | extern void print_hex_dump(const char *level, const char *prefix_str, | 318 | extern void print_hex_dump(const char *level, const char *prefix_str, |
| 319 | int prefix_type, int rowsize, int groupsize, | 319 | int prefix_type, int rowsize, int groupsize, |
| 320 | const void *buf, size_t len, bool ascii); | 320 | const void *buf, size_t len, bool ascii); |
| 321 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
| 322 | #define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \ | ||
| 323 | dynamic_hex_dump(prefix_str, prefix_type, 16, 1, buf, len, true) | ||
| 324 | #else | ||
| 321 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | 325 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, |
| 322 | const void *buf, size_t len); | 326 | const void *buf, size_t len); |
| 327 | #endif /* defined(CONFIG_DYNAMIC_DEBUG) */ | ||
| 323 | #else | 328 | #else |
| 324 | static inline void print_hex_dump(const char *level, const char *prefix_str, | 329 | static inline void print_hex_dump(const char *level, const char *prefix_str, |
| 325 | int prefix_type, int rowsize, int groupsize, | 330 | int prefix_type, int rowsize, int groupsize, |
| @@ -333,4 +338,16 @@ static inline void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | |||
| 333 | 338 | ||
| 334 | #endif | 339 | #endif |
| 335 | 340 | ||
| 341 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
| 342 | #define print_hex_dump_debug(prefix_str, prefix_type, rowsize, \ | ||
| 343 | groupsize, buf, len, ascii) \ | ||
| 344 | dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | ||
| 345 | groupsize, buf, len, ascii) | ||
| 346 | #else | ||
| 347 | #define print_hex_dump_debug(prefix_str, prefix_type, rowsize, \ | ||
| 348 | groupsize, buf, len, ascii) \ | ||
| 349 | print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize, \ | ||
| 350 | groupsize, buf, len, ascii) | ||
| 351 | #endif /* defined(CONFIG_DYNAMIC_DEBUG) */ | ||
| 352 | |||
| 336 | #endif | 353 | #endif |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 11d05f9fe8b6..580b24c8b8ca 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -149,7 +149,7 @@ extern int rtc_initialize_alarm(struct rtc_device *rtc, | |||
| 149 | extern void rtc_update_irq(struct rtc_device *rtc, | 149 | extern void rtc_update_irq(struct rtc_device *rtc, |
| 150 | unsigned long num, unsigned long events); | 150 | unsigned long num, unsigned long events); |
| 151 | 151 | ||
| 152 | extern struct rtc_device *rtc_class_open(char *name); | 152 | extern struct rtc_device *rtc_class_open(const char *name); |
| 153 | extern void rtc_class_close(struct rtc_device *rtc); | 153 | extern void rtc_class_close(struct rtc_device *rtc); |
| 154 | 154 | ||
| 155 | extern int rtc_irq_register(struct rtc_device *rtc, | 155 | extern int rtc_irq_register(struct rtc_device *rtc, |
