From: Linus Torvalds Date: Mon, 15 Dec 2014 00:10:09 +0000 (-0800) Subject: Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: v3.19-rc1~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6b5be2be4e30037eb551e0ed09dd97bd00d85d3;p=thirdparty%2Fkernel%2Flinux.git Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev__once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ... --- e6b5be2be4e30037eb551e0ed09dd97bd00d85d3 diff --cc drivers/base/Makefile index 53c3fe1aeb29c,e81a55ca513cb..527d291706e89 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@@ -4,7 -4,7 +4,7 @@@ obj-y := component.o core.o bus.o dd. driver.o class.o platform.o \ cpu.o firmware.o init.o map.o devres.o \ attribute_container.o transport_class.o \ - topology.o container.o property.o - topology.o container.o cacheinfo.o ++ topology.o container.o property.o cacheinfo.o obj-$(CONFIG_DEVTMPFS) += devtmpfs.o obj-$(CONFIG_DMA_CMA) += dma-contiguous.o obj-y += power/ diff --cc drivers/bus/brcmstb_gisb.c index 46de8dc39eb4c,5b15cd2cbd8ef..738612c45266c --- a/drivers/bus/brcmstb_gisb.c +++ b/drivers/bus/brcmstb_gisb.c @@@ -387,11 -273,10 +387,10 @@@ static const struct dev_pm_ops brcmstb_ }; static struct platform_driver brcmstb_gisb_arb_driver = { - .probe = brcmstb_gisb_arb_probe, .driver = { .name = "brcm-gisb-arb", - .owner = THIS_MODULE, .of_match_table = brcmstb_gisb_arb_of_match, + .pm = &brcmstb_gisb_arb_pm_ops, }, }; diff --cc drivers/bus/omap_l3_noc.c index 17d86595951c0,1ff1863415c5e..029bc73de001c --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c @@@ -358,8 -300,6 +358,7 @@@ static struct platform_driver omap_l3_d .probe = omap_l3_probe, .driver = { .name = "omap_l3_noc", - .owner = THIS_MODULE, + .pm = L3_DEV_PM_OPS, .of_match_table = of_match_ptr(l3_noc_match), }, }; diff --cc drivers/hwmon/ibmpowernv.c index 7c2c7be182f25,58ea44ec6c77f..febe8175d36ce --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@@ -301,24 -309,50 +301,23 @@@ static int ibmpowernv_probe(struct plat return PTR_ERR_OR_ZERO(hwmon_dev); } -static struct platform_driver ibmpowernv_driver = { - .driver = { - .name = DRVNAME, +static const struct platform_device_id opal_sensor_driver_ids[] = { + { + .name = "opal-sensor", }, + { } }; +MODULE_DEVICE_TABLE(platform, opal_sensor_driver_ids); -static int __init ibmpowernv_init(void) -{ - int err; - - pdevice = platform_device_alloc(DRVNAME, 0); - if (!pdevice) { - pr_err("Device allocation failed\n"); - err = -ENOMEM; - goto exit; - } - - err = platform_device_add(pdevice); - if (err) { - pr_err("Device addition failed (%d)\n", err); - goto exit_device_put; - } - - err = platform_driver_probe(&ibmpowernv_driver, ibmpowernv_probe); - if (err) { - pr_err("Platfrom driver probe failed\n"); - goto exit_device_del; - } - - return 0; - -exit_device_del: - platform_device_del(pdevice); -exit_device_put: - platform_device_put(pdevice); -exit: - return err; -} +static struct platform_driver ibmpowernv_driver = { + .probe = ibmpowernv_probe, + .id_table = opal_sensor_driver_ids, + .driver = { - .owner = THIS_MODULE, + .name = DRVNAME, + }, +}; -static void __exit ibmpowernv_exit(void) -{ - platform_driver_unregister(&ibmpowernv_driver); - platform_device_unregister(pdevice); -} +module_platform_driver(ibmpowernv_driver); MODULE_AUTHOR("Neelesh Gupta "); MODULE_DESCRIPTION("IBM POWERNV platform sensors"); diff --cc drivers/input/keyboard/gpio_keys_polled.c index c9c1c8ca7267c,10f0098f3c773..90df4df58b076 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@@ -297,8 -307,7 +297,7 @@@ static struct platform_driver gpio_keys .probe = gpio_keys_polled_probe, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, - .of_match_table = of_match_ptr(gpio_keys_polled_of_match), + .of_match_table = gpio_keys_polled_of_match, }, }; module_platform_driver(gpio_keys_polled_driver); diff --cc drivers/leds/leds-gpio.c index 868e6fc17cbad,ac4768f2b2b4e..8a8ba11c5c14c --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@@ -291,8 -287,7 +291,7 @@@ static struct platform_driver gpio_led_ .remove = gpio_led_remove, .driver = { .name = "leds-gpio", - .owner = THIS_MODULE, - .of_match_table = of_match_ptr(of_gpio_leds_match), + .of_match_table = of_gpio_leds_match, }, }; diff --cc drivers/media/platform/vim2m.c index 1105c111cc107,b8c9677a7c70e..d9d844aab39b7 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@@ -1055,12 -1055,11 +1055,11 @@@ static int vim2m_remove(struct platform return 0; } -static struct platform_driver m2mtest_pdrv = { - .probe = m2mtest_probe, - .remove = m2mtest_remove, +static struct platform_driver vim2m_pdrv = { + .probe = vim2m_probe, + .remove = vim2m_remove, .driver = { .name = MEM2MEM_NAME, - .owner = THIS_MODULE, }, }; diff --cc drivers/mfd/syscon.c index 72373b1138857,e85c052b302c1..176bf0fa2685e --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@@ -219,7 -166,7 +219,6 @@@ static const struct platform_device_id static struct platform_driver syscon_driver = { .driver = { .name = "syscon", - .owner = THIS_MODULE, - .of_match_table = of_syscon_match, }, .probe = syscon_probe, .id_table = syscon_ids, diff --cc drivers/net/wireless/ath/ath9k/debug.c index 696e3d5309c6b,e7b709f03b29e..871e969409bfd --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@@ -832,57 -758,42 +758,46 @@@ static int read_file_misc(struct seq_fi continue; ath9k_calculate_iter_data(sc, ctx, &iter_data); - len += scnprintf(buf + len, sizeof(buf) - len, - "VIFS: CTX %i(%i) AP: %i STA: %i MESH: %i WDS: %i", - i++, (int)(ctx->assigned), iter_data.naps, - iter_data.nstations, - iter_data.nmeshes, iter_data.nwds); - len += scnprintf(buf + len, sizeof(buf) - len, - " ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n", - iter_data.nadhocs, sc->cur_chan->nvifs, sc->nbcnvifs); + seq_printf(file, - "VIF-COUNTS: CTX %i AP: %i STA: %i MESH: %i WDS: %i", - i++, iter_data.naps, iter_data.nstations, ++ "VIFS: CTX %i(%i) AP: %i STA: %i MESH: %i WDS: %i", ++ i++, (int)(ctx->assigned), iter_data.naps, ++ iter_data.nstations, + iter_data.nmeshes, iter_data.nwds); + seq_printf(file, " ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n", + iter_data.nadhocs, sc->cur_chan->nvifs, + sc->nbcnvifs); } - if (len > sizeof(buf)) - len = sizeof(buf); - - retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); - return retval; + return 0; } - static ssize_t read_file_reset(struct file *file, char __user *user_buf, - size_t count, loff_t *ppos) + static int read_file_reset(struct seq_file *file, void *data) { - struct ath_softc *sc = file->private_data; + struct ath_softc *sc = file->private; + static const char * const reset_cause[__RESET_TYPE_MAX] = { + [RESET_TYPE_BB_HANG] = "Baseband Hang", + [RESET_TYPE_BB_WATCHDOG] = "Baseband Watchdog", + [RESET_TYPE_FATAL_INT] = "Fatal HW Error", + [RESET_TYPE_TX_ERROR] = "TX HW error", + [RESET_TYPE_TX_GTT] = "Transmit timeout", + [RESET_TYPE_TX_HANG] = "TX Path Hang", + [RESET_TYPE_PLL_HANG] = "PLL RX Hang", + [RESET_TYPE_MAC_HANG] = "MAC Hang", + [RESET_TYPE_BEACON_STUCK] = "Stuck Beacon", + [RESET_TYPE_MCI] = "MCI Reset", + [RESET_TYPE_CALIBRATION] = "Calibration error", + }; - char buf[512]; - unsigned int len = 0; + int i; - seq_printf(file, "%17s: %2d\n", "Baseband Hang", - sc->debug.stats.reset[RESET_TYPE_BB_HANG]); - seq_printf(file, "%17s: %2d\n", "Baseband Watchdog", - sc->debug.stats.reset[RESET_TYPE_BB_WATCHDOG]); - seq_printf(file, "%17s: %2d\n", "Fatal HW Error", - sc->debug.stats.reset[RESET_TYPE_FATAL_INT]); - seq_printf(file, "%17s: %2d\n", "TX HW error", - sc->debug.stats.reset[RESET_TYPE_TX_ERROR]); - seq_printf(file, "%17s: %2d\n", "TX Path Hang", - sc->debug.stats.reset[RESET_TYPE_TX_HANG]); - seq_printf(file, "%17s: %2d\n", "PLL RX Hang", - sc->debug.stats.reset[RESET_TYPE_PLL_HANG]); - seq_printf(file, "%17s: %2d\n", "MAC Hang", - sc->debug.stats.reset[RESET_TYPE_MAC_HANG]); - seq_printf(file, "%17s: %2d\n", "Stuck Beacon", - sc->debug.stats.reset[RESET_TYPE_BEACON_STUCK]); - seq_printf(file, "%17s: %2d\n", "MCI Reset", - sc->debug.stats.reset[RESET_TYPE_MCI]); + for (i = 0; i < ARRAY_SIZE(reset_cause); i++) { + if (!reset_cause[i]) + continue; + - len += scnprintf(buf + len, sizeof(buf) - len, - "%17s: %2d\n", reset_cause[i], - sc->debug.stats.reset[i]); ++ seq_printf(file, "%17s: %2d\n", reset_cause[i], ++ sc->debug.stats.reset[i]); + } - if (len > sizeof(buf)) - len = sizeof(buf); - - return simple_read_from_buffer(user_buf, count, ppos, buf, len); + return 0; } void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, diff --cc drivers/pinctrl/pinctrl-rockchip.c index 40970c305dd0a,71d5835d864b3..ba74f0aa60c76 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@@ -2053,8 -1982,6 +2053,7 @@@ static struct platform_driver rockchip_ .probe = rockchip_pinctrl_probe, .driver = { .name = "rockchip-pinctrl", - .owner = THIS_MODULE, + .pm = &rockchip_pinctrl_dev_pm_ops, .of_match_table = rockchip_pinctrl_dt_match, }, }; diff --cc drivers/rtc/rtc-at91sam9.c index abac38abd38e5,dcf211b941a5a..6b9aaf1afc720 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c @@@ -525,9 -446,7 +525,8 @@@ static struct platform_driver at91_rtc_ .shutdown = at91_rtc_shutdown, .driver = { .name = "rtc-at91sam9", - .owner = THIS_MODULE, .pm = &at91_rtc_pm_ops, + .of_match_table = of_match_ptr(at91_rtc_dt_ids), }, }; diff --cc drivers/rtc/rtc-omap.c index 4f1c6ca972112,ae444a8bd602b..8e5851aa4369b --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@@ -718,8 -568,7 +718,7 @@@ static struct platform_driver omap_rtc_ .remove = __exit_p(omap_rtc_remove), .shutdown = omap_rtc_shutdown, .driver = { - .name = DRIVER_NAME, + .name = "omap_rtc", - .owner = THIS_MODULE, .pm = &omap_rtc_pm_ops, .of_match_table = omap_rtc_of_match, }, diff --cc drivers/rtc/rtc-snvs.c index 942b267c62713,f04c378b781af..0479e807a776a --- a/drivers/rtc/rtc-snvs.c +++ b/drivers/rtc/rtc-snvs.c @@@ -367,8 -327,7 +367,7 @@@ MODULE_DEVICE_TABLE(of, snvs_dt_ids) static struct platform_driver snvs_rtc_driver = { .driver = { .name = "snvs_rtc", - .owner = THIS_MODULE, - .pm = &snvs_rtc_pm_ops, + .pm = SNVS_RTC_PM_OPS, .of_match_table = snvs_dt_ids, }, .probe = snvs_rtc_probe, diff --cc drivers/tty/serial/of_serial.c index 6dbd34c4f9e70,1f65e727c0eaf..64f1bab7e9d75 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@@ -342,8 -295,8 +342,7 @@@ static struct of_device_id of_platform_ static struct platform_driver of_platform_serial_driver = { .driver = { .name = "of_serial", - .owner = THIS_MODULE, .of_match_table = of_platform_serial_table, - .pm = &of_serial_pm_ops, }, .probe = of_platform_serial_probe, .remove = of_platform_serial_remove, diff --cc drivers/usb/chipidea/ci_hdrc_imx.c index 450a168974d5d,e913792e4df56..0f05de7c6b6c7 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@@ -247,9 -215,7 +247,8 @@@ static struct platform_driver ci_hdrc_i .remove = ci_hdrc_imx_remove, .driver = { .name = "imx_usb", - .owner = THIS_MODULE, .of_match_table = ci_hdrc_imx_dt_ids, + .pm = &ci_hdrc_imx_pm_ops, }, }; diff --cc drivers/usb/chipidea/core.c index e14eafb2a05e2,947ed6e78be2c..5b9825a4538a6 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@@ -867,8 -751,6 +867,7 @@@ static struct platform_driver ci_hdrc_d .remove = ci_hdrc_remove, .driver = { .name = "ci_hdrc", + .pm = &ci_pm_ops, - .owner = THIS_MODULE, }, }; diff --cc drivers/usb/gadget/udc/pxa27x_udc.c index 9b03fab137070,61bceedf515d9..c61a896061faf --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c @@@ -2591,8 -2614,6 +2591,7 @@@ MODULE_ALIAS("platform:pxa27x-udc") static struct platform_driver udc_driver = { .driver = { .name = "pxa27x-udc", - .owner = THIS_MODULE, + .of_match_table = of_match_ptr(udc_pxa_dt_ids), }, .probe = pxa_udc_probe, .remove = pxa_udc_remove, diff --cc sound/soc/intel/sst-haswell-pcm.c index 0180b386c4211,ad21e636edc6c..b8a782c0d4cd2 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c @@@ -1170,9 -899,6 +1170,7 @@@ static const struct dev_pm_ops hsw_pcm_ static struct platform_driver hsw_pcm_driver = { .driver = { .name = "haswell-pcm-audio", - .owner = THIS_MODULE, + .pm = &hsw_pcm_pm, - }, .probe = hsw_pcm_dev_probe,