Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
"Here are some small driver core fixes for 5.15-rc6, all of which have
been in linux-next for a while with no reported issues.

They include:

- kernfs negative dentry bugfix

- simple pm bus fixes to resolve reported issues"

* tag 'driver-core-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
drivers: bus: Delete CONFIG_SIMPLE_PM_BUS
drivers: bus: simple-pm-bus: Add support for probing simple bus only devices
driver core: Reject pointless SYNC_STATE_ONLY device links
kernfs: don't create a negative dentry if inactive node exists

+50 -24
-1
arch/arm/configs/multi_v7_defconfig
··· 197 197 CONFIG_DEVTMPFS=y 198 198 CONFIG_DEVTMPFS_MOUNT=y 199 199 CONFIG_OMAP_OCP2SCP=y 200 - CONFIG_SIMPLE_PM_BUS=y 201 200 CONFIG_MTD=y 202 201 CONFIG_MTD_CMDLINE_PARTS=y 203 202 CONFIG_MTD_BLOCK=y
-1
arch/arm/configs/oxnas_v6_defconfig
··· 46 46 CONFIG_DEVTMPFS_MOUNT=y 47 47 CONFIG_DMA_CMA=y 48 48 CONFIG_CMA_SIZE_MBYTES=64 49 - CONFIG_SIMPLE_PM_BUS=y 50 49 CONFIG_MTD=y 51 50 CONFIG_MTD_CMDLINE_PARTS=y 52 51 CONFIG_MTD_BLOCK=y
-1
arch/arm/configs/shmobile_defconfig
··· 40 40 CONFIG_PCIE_RCAR_HOST=y 41 41 CONFIG_DEVTMPFS=y 42 42 CONFIG_DEVTMPFS_MOUNT=y 43 - CONFIG_SIMPLE_PM_BUS=y 44 43 CONFIG_MTD=y 45 44 CONFIG_MTD_BLOCK=y 46 45 CONFIG_MTD_CFI=y
-1
arch/arm/mach-omap2/Kconfig
··· 112 112 select PM_GENERIC_DOMAINS 113 113 select PM_GENERIC_DOMAINS_OF 114 114 select RESET_CONTROLLER 115 - select SIMPLE_PM_BUS 116 115 select SOC_BUS 117 116 select TI_SYSC 118 117 select OMAP_IRQCHIP
-1
arch/arm64/configs/defconfig
··· 245 245 CONFIG_FW_LOADER_USER_HELPER=y 246 246 CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y 247 247 CONFIG_HISILICON_LPC=y 248 - CONFIG_SIMPLE_PM_BUS=y 249 248 CONFIG_FSL_MC_BUS=y 250 249 CONFIG_TEGRA_ACONNECT=m 251 250 CONFIG_GNSS=m
+2 -1
drivers/base/core.c
··· 687 687 { 688 688 struct device_link *link; 689 689 690 - if (!consumer || !supplier || flags & ~DL_ADD_VALID_FLAGS || 690 + if (!consumer || !supplier || consumer == supplier || 691 + flags & ~DL_ADD_VALID_FLAGS || 691 692 (flags & DL_FLAG_STATELESS && flags & DL_MANAGED_LINK_FLAGS) || 692 693 (flags & DL_FLAG_SYNC_STATE_ONLY && 693 694 (flags & ~DL_FLAG_INFERRED) != DL_FLAG_SYNC_STATE_ONLY) ||
-12
drivers/bus/Kconfig
··· 152 152 Interface 2, which can be used to connect things like NAND Flash, 153 153 SRAM, ethernet adapters, FPGAs and LCD displays. 154 154 155 - config SIMPLE_PM_BUS 156 - tristate "Simple Power-Managed Bus Driver" 157 - depends on OF && PM 158 - help 159 - Driver for transparent busses that don't need a real driver, but 160 - where the bus controller is part of a PM domain, or under the control 161 - of a functional clock, and thus relies on runtime PM for managing 162 - this PM domain and/or clock. 163 - An example of such a bus controller is the Renesas Bus State 164 - Controller (BSC, sometimes called "LBSC within Bus Bridge", or 165 - "External Bus Interface") as found on several Renesas ARM SoCs. 166 - 167 155 config SUN50I_DE2_BUS 168 156 bool "Allwinner A64 DE2 Bus Driver" 169 157 default ARM64
+1 -1
drivers/bus/Makefile
··· 27 27 obj-$(CONFIG_QCOM_EBI2) += qcom-ebi2.o 28 28 obj-$(CONFIG_SUN50I_DE2_BUS) += sun50i-de2.o 29 29 obj-$(CONFIG_SUNXI_RSB) += sunxi-rsb.o 30 - obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o 30 + obj-$(CONFIG_OF) += simple-pm-bus.o 31 31 obj-$(CONFIG_TEGRA_ACONNECT) += tegra-aconnect.o 32 32 obj-$(CONFIG_TEGRA_GMI) += tegra-gmi.o 33 33 obj-$(CONFIG_TI_PWMSS) += ti-pwmss.o
+39 -3
drivers/bus/simple-pm-bus.c
··· 13 13 #include <linux/platform_device.h> 14 14 #include <linux/pm_runtime.h> 15 15 16 - 17 16 static int simple_pm_bus_probe(struct platform_device *pdev) 18 17 { 19 - const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev); 20 - struct device_node *np = pdev->dev.of_node; 18 + const struct device *dev = &pdev->dev; 19 + const struct of_dev_auxdata *lookup = dev_get_platdata(dev); 20 + struct device_node *np = dev->of_node; 21 + const struct of_device_id *match; 22 + 23 + /* 24 + * Allow user to use driver_override to bind this driver to a 25 + * transparent bus device which has a different compatible string 26 + * that's not listed in simple_pm_bus_of_match. We don't want to do any 27 + * of the simple-pm-bus tasks for these devices, so return early. 28 + */ 29 + if (pdev->driver_override) 30 + return 0; 31 + 32 + match = of_match_device(dev->driver->of_match_table, dev); 33 + /* 34 + * These are transparent bus devices (not simple-pm-bus matches) that 35 + * have their child nodes populated automatically. So, don't need to 36 + * do anything more. We only match with the device if this driver is 37 + * the most specific match because we don't want to incorrectly bind to 38 + * a device that has a more specific driver. 39 + */ 40 + if (match && match->data) { 41 + if (of_property_match_string(np, "compatible", match->compatible) == 0) 42 + return 0; 43 + else 44 + return -ENODEV; 45 + } 21 46 22 47 dev_dbg(&pdev->dev, "%s\n", __func__); 23 48 ··· 56 31 57 32 static int simple_pm_bus_remove(struct platform_device *pdev) 58 33 { 34 + const void *data = of_device_get_match_data(&pdev->dev); 35 + 36 + if (pdev->driver_override || data) 37 + return 0; 38 + 59 39 dev_dbg(&pdev->dev, "%s\n", __func__); 60 40 61 41 pm_runtime_disable(&pdev->dev); 62 42 return 0; 63 43 } 64 44 45 + #define ONLY_BUS ((void *) 1) /* Match if the device is only a bus. */ 46 + 65 47 static const struct of_device_id simple_pm_bus_of_match[] = { 66 48 { .compatible = "simple-pm-bus", }, 49 + { .compatible = "simple-bus", .data = ONLY_BUS }, 50 + { .compatible = "simple-mfd", .data = ONLY_BUS }, 51 + { .compatible = "isa", .data = ONLY_BUS }, 52 + { .compatible = "arm,amba-bus", .data = ONLY_BUS }, 67 53 { /* sentinel */ } 68 54 }; 69 55 MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);
-1
drivers/soc/canaan/Kconfig
··· 5 5 depends on RISCV && SOC_CANAAN && OF 6 6 default SOC_CANAAN 7 7 select PM 8 - select SIMPLE_PM_BUS 9 8 select SYSCON 10 9 select MFD_SYSCON 11 10 help
+8 -1
fs/kernfs/dir.c
··· 1111 1111 1112 1112 kn = kernfs_find_ns(parent, dentry->d_name.name, ns); 1113 1113 /* attach dentry and inode */ 1114 - if (kn && kernfs_active(kn)) { 1114 + if (kn) { 1115 + /* Inactive nodes are invisible to the VFS so don't 1116 + * create a negative. 1117 + */ 1118 + if (!kernfs_active(kn)) { 1119 + up_read(&kernfs_rwsem); 1120 + return NULL; 1121 + } 1115 1122 inode = kernfs_get_inode(dir->i_sb, kn); 1116 1123 if (!inode) 1117 1124 inode = ERR_PTR(-ENOMEM);