Loading arch/arm/mach-pxa/raumfeld.c +4 −8 Original line number Diff line number Diff line Loading @@ -385,10 +385,6 @@ static struct property_entry raumfeld_rotary_properties[] = { { }, }; static struct property_set raumfeld_rotary_property_set = { .properties = raumfeld_rotary_properties, }; static struct platform_device rotary_encoder_device = { .name = "rotary-encoder", .id = 0, Loading Loading @@ -1063,8 +1059,8 @@ static void __init __maybe_unused raumfeld_controller_init(void) pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config)); gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); device_add_property_set(&rotary_encoder_device.dev, &raumfeld_rotary_property_set); device_add_properties(&rotary_encoder_device.dev, raumfeld_rotary_properties); platform_device_register(&rotary_encoder_device); spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices)); Loading Loading @@ -1103,8 +1099,8 @@ static void __init __maybe_unused raumfeld_speaker_init(void) platform_device_register(&smc91x_device); gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); device_add_property_set(&rotary_encoder_device.dev, &raumfeld_rotary_property_set); device_add_properties(&rotary_encoder_device.dev, raumfeld_rotary_properties); platform_device_register(&rotary_encoder_device); raumfeld_audio_init(); Loading arch/arm/mach-tegra/board-paz00.c +1 −5 Original line number Diff line number Diff line Loading @@ -29,10 +29,6 @@ static struct property_entry __initdata wifi_rfkill_prop[] = { { }, }; static struct property_set __initdata wifi_rfkill_pset = { .properties = wifi_rfkill_prop, }; static struct platform_device wifi_rfkill_device = { .name = "rfkill_gpio", .id = -1, Loading @@ -49,7 +45,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = { void __init tegra_paz00_wifikill_init(void) { platform_device_add_properties(&wifi_rfkill_device, &wifi_rfkill_pset); platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop); gpiod_add_lookup_table(&wifi_gpio_lookup); platform_device_register(&wifi_rfkill_device); } drivers/base/platform.c +10 −9 Original line number Diff line number Diff line Loading @@ -322,16 +322,16 @@ EXPORT_SYMBOL_GPL(platform_device_add_data); /** * platform_device_add_properties - add built-in properties to a platform device * @pdev: platform device to add properties to * @pset: properties to add * @properties: null terminated array of properties to add * * The function will take deep copy of the properties in @pset and attach * the copy to the platform device. The memory associated with properties * will be freed when the platform device is released. * The function will take deep copy of @properties and attach the copy to the * platform device. The memory associated with properties will be freed when the * platform device is released. */ int platform_device_add_properties(struct platform_device *pdev, const struct property_set *pset) struct property_entry *properties) { return device_add_property_set(&pdev->dev, pset); return device_add_properties(&pdev->dev, properties); } EXPORT_SYMBOL_GPL(platform_device_add_properties); Loading Loading @@ -447,7 +447,7 @@ void platform_device_del(struct platform_device *pdev) release_resource(r); } device_remove_property_set(&pdev->dev); device_remove_properties(&pdev->dev); } } EXPORT_SYMBOL_GPL(platform_device_del); Loading Loading @@ -526,8 +526,9 @@ struct platform_device *platform_device_register_full( if (ret) goto err; if (pdevinfo->pset) { ret = platform_device_add_properties(pdev, pdevinfo->pset); if (pdevinfo->properties) { ret = platform_device_add_properties(pdev, pdevinfo->properties); if (ret) goto err; } Loading drivers/base/property.c +21 −13 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ #include <linux/etherdevice.h> #include <linux/phy.h> struct property_set { struct fwnode_handle fwnode; struct property_entry *properties; }; static inline bool is_pset_node(struct fwnode_handle *fwnode) { return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_PDATA; Loading Loading @@ -801,14 +806,14 @@ static struct property_set *pset_copy_set(const struct property_set *pset) } /** * device_remove_property_set - Remove properties from a device object. * device_remove_properties - Remove properties from a device object. * @dev: Device whose properties to remove. * * The function removes properties previously associated to the device * secondary firmware node with device_add_property_set(). Memory allocated * secondary firmware node with device_add_properties(). Memory allocated * to the properties will also be released. */ void device_remove_property_set(struct device *dev) void device_remove_properties(struct device *dev) { struct fwnode_handle *fwnode; Loading @@ -831,24 +836,27 @@ void device_remove_property_set(struct device *dev) } } } EXPORT_SYMBOL_GPL(device_remove_property_set); EXPORT_SYMBOL_GPL(device_remove_properties); /** * device_add_property_set - Add a collection of properties to a device object. * device_add_properties - Add a collection of properties to a device object. * @dev: Device to add properties to. * @pset: Collection of properties to add. * @properties: Collection of properties to add. * * Associate a collection of device properties represented by @pset with @dev * as its secondary firmware node. The function takes a copy of @pset. * Associate a collection of device properties represented by @properties with * @dev as its secondary firmware node. The function takes a copy of * @properties. */ int device_add_property_set(struct device *dev, const struct property_set *pset) int device_add_properties(struct device *dev, struct property_entry *properties) { struct property_set *p; struct property_set *p, pset; if (!pset) if (!properties) return -EINVAL; p = pset_copy_set(pset); pset.properties = properties; p = pset_copy_set(&pset); if (IS_ERR(p)) return PTR_ERR(p); Loading @@ -856,7 +864,7 @@ int device_add_property_set(struct device *dev, const struct property_set *pset) set_secondary_fwnode(dev, &p->fwnode); return 0; } EXPORT_SYMBOL_GPL(device_add_property_set); EXPORT_SYMBOL_GPL(device_add_properties); /** * device_get_next_child_node - Return the next child node handle for a device Loading drivers/mfd/intel-lpss-acpi.c +2 −10 Original line number Diff line number Diff line Loading @@ -31,13 +31,9 @@ static struct property_entry spt_i2c_properties[] = { { }, }; static struct property_set spt_i2c_pset = { .properties = spt_i2c_properties, }; static const struct intel_lpss_platform_info spt_i2c_info = { .clk_rate = 120000000, .pset = &spt_i2c_pset, .properties = spt_i2c_properties, }; static const struct intel_lpss_platform_info bxt_info = { Loading @@ -51,13 +47,9 @@ static struct property_entry bxt_i2c_properties[] = { { }, }; static struct property_set bxt_i2c_pset = { .properties = bxt_i2c_properties, }; static const struct intel_lpss_platform_info bxt_i2c_info = { .clk_rate = 133000000, .pset = &bxt_i2c_pset, .properties = bxt_i2c_properties, }; static const struct acpi_device_id intel_lpss_acpi_ids[] = { Loading Loading
arch/arm/mach-pxa/raumfeld.c +4 −8 Original line number Diff line number Diff line Loading @@ -385,10 +385,6 @@ static struct property_entry raumfeld_rotary_properties[] = { { }, }; static struct property_set raumfeld_rotary_property_set = { .properties = raumfeld_rotary_properties, }; static struct platform_device rotary_encoder_device = { .name = "rotary-encoder", .id = 0, Loading Loading @@ -1063,8 +1059,8 @@ static void __init __maybe_unused raumfeld_controller_init(void) pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config)); gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); device_add_property_set(&rotary_encoder_device.dev, &raumfeld_rotary_property_set); device_add_properties(&rotary_encoder_device.dev, raumfeld_rotary_properties); platform_device_register(&rotary_encoder_device); spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices)); Loading Loading @@ -1103,8 +1099,8 @@ static void __init __maybe_unused raumfeld_speaker_init(void) platform_device_register(&smc91x_device); gpiod_add_lookup_table(&raumfeld_rotary_gpios_table); device_add_property_set(&rotary_encoder_device.dev, &raumfeld_rotary_property_set); device_add_properties(&rotary_encoder_device.dev, raumfeld_rotary_properties); platform_device_register(&rotary_encoder_device); raumfeld_audio_init(); Loading
arch/arm/mach-tegra/board-paz00.c +1 −5 Original line number Diff line number Diff line Loading @@ -29,10 +29,6 @@ static struct property_entry __initdata wifi_rfkill_prop[] = { { }, }; static struct property_set __initdata wifi_rfkill_pset = { .properties = wifi_rfkill_prop, }; static struct platform_device wifi_rfkill_device = { .name = "rfkill_gpio", .id = -1, Loading @@ -49,7 +45,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = { void __init tegra_paz00_wifikill_init(void) { platform_device_add_properties(&wifi_rfkill_device, &wifi_rfkill_pset); platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop); gpiod_add_lookup_table(&wifi_gpio_lookup); platform_device_register(&wifi_rfkill_device); }
drivers/base/platform.c +10 −9 Original line number Diff line number Diff line Loading @@ -322,16 +322,16 @@ EXPORT_SYMBOL_GPL(platform_device_add_data); /** * platform_device_add_properties - add built-in properties to a platform device * @pdev: platform device to add properties to * @pset: properties to add * @properties: null terminated array of properties to add * * The function will take deep copy of the properties in @pset and attach * the copy to the platform device. The memory associated with properties * will be freed when the platform device is released. * The function will take deep copy of @properties and attach the copy to the * platform device. The memory associated with properties will be freed when the * platform device is released. */ int platform_device_add_properties(struct platform_device *pdev, const struct property_set *pset) struct property_entry *properties) { return device_add_property_set(&pdev->dev, pset); return device_add_properties(&pdev->dev, properties); } EXPORT_SYMBOL_GPL(platform_device_add_properties); Loading Loading @@ -447,7 +447,7 @@ void platform_device_del(struct platform_device *pdev) release_resource(r); } device_remove_property_set(&pdev->dev); device_remove_properties(&pdev->dev); } } EXPORT_SYMBOL_GPL(platform_device_del); Loading Loading @@ -526,8 +526,9 @@ struct platform_device *platform_device_register_full( if (ret) goto err; if (pdevinfo->pset) { ret = platform_device_add_properties(pdev, pdevinfo->pset); if (pdevinfo->properties) { ret = platform_device_add_properties(pdev, pdevinfo->properties); if (ret) goto err; } Loading
drivers/base/property.c +21 −13 Original line number Diff line number Diff line Loading @@ -19,6 +19,11 @@ #include <linux/etherdevice.h> #include <linux/phy.h> struct property_set { struct fwnode_handle fwnode; struct property_entry *properties; }; static inline bool is_pset_node(struct fwnode_handle *fwnode) { return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_PDATA; Loading Loading @@ -801,14 +806,14 @@ static struct property_set *pset_copy_set(const struct property_set *pset) } /** * device_remove_property_set - Remove properties from a device object. * device_remove_properties - Remove properties from a device object. * @dev: Device whose properties to remove. * * The function removes properties previously associated to the device * secondary firmware node with device_add_property_set(). Memory allocated * secondary firmware node with device_add_properties(). Memory allocated * to the properties will also be released. */ void device_remove_property_set(struct device *dev) void device_remove_properties(struct device *dev) { struct fwnode_handle *fwnode; Loading @@ -831,24 +836,27 @@ void device_remove_property_set(struct device *dev) } } } EXPORT_SYMBOL_GPL(device_remove_property_set); EXPORT_SYMBOL_GPL(device_remove_properties); /** * device_add_property_set - Add a collection of properties to a device object. * device_add_properties - Add a collection of properties to a device object. * @dev: Device to add properties to. * @pset: Collection of properties to add. * @properties: Collection of properties to add. * * Associate a collection of device properties represented by @pset with @dev * as its secondary firmware node. The function takes a copy of @pset. * Associate a collection of device properties represented by @properties with * @dev as its secondary firmware node. The function takes a copy of * @properties. */ int device_add_property_set(struct device *dev, const struct property_set *pset) int device_add_properties(struct device *dev, struct property_entry *properties) { struct property_set *p; struct property_set *p, pset; if (!pset) if (!properties) return -EINVAL; p = pset_copy_set(pset); pset.properties = properties; p = pset_copy_set(&pset); if (IS_ERR(p)) return PTR_ERR(p); Loading @@ -856,7 +864,7 @@ int device_add_property_set(struct device *dev, const struct property_set *pset) set_secondary_fwnode(dev, &p->fwnode); return 0; } EXPORT_SYMBOL_GPL(device_add_property_set); EXPORT_SYMBOL_GPL(device_add_properties); /** * device_get_next_child_node - Return the next child node handle for a device Loading
drivers/mfd/intel-lpss-acpi.c +2 −10 Original line number Diff line number Diff line Loading @@ -31,13 +31,9 @@ static struct property_entry spt_i2c_properties[] = { { }, }; static struct property_set spt_i2c_pset = { .properties = spt_i2c_properties, }; static const struct intel_lpss_platform_info spt_i2c_info = { .clk_rate = 120000000, .pset = &spt_i2c_pset, .properties = spt_i2c_properties, }; static const struct intel_lpss_platform_info bxt_info = { Loading @@ -51,13 +47,9 @@ static struct property_entry bxt_i2c_properties[] = { { }, }; static struct property_set bxt_i2c_pset = { .properties = bxt_i2c_properties, }; static const struct intel_lpss_platform_info bxt_i2c_info = { .clk_rate = 133000000, .pset = &bxt_i2c_pset, .properties = bxt_i2c_properties, }; static const struct acpi_device_id intel_lpss_acpi_ids[] = { Loading