Skip to content

Commit 2338e7b

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
device property: Remove device_add_properties() API
There are no more users for it. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 982b94b commit 2338e7b

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

drivers/base/property.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -507,54 +507,6 @@ struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
507507
}
508508
EXPORT_SYMBOL_GPL(fwnode_find_reference);
509509

510-
/**
511-
* device_remove_properties - Remove properties from a device object.
512-
* @dev: Device whose properties to remove.
513-
*
514-
* The function removes properties previously associated to the device
515-
* firmware node with device_add_properties(). Memory allocated to the
516-
* properties will also be released.
517-
*/
518-
void device_remove_properties(struct device *dev)
519-
{
520-
struct fwnode_handle *fwnode = dev_fwnode(dev);
521-
522-
if (!fwnode)
523-
return;
524-
525-
if (is_software_node(fwnode->secondary)) {
526-
fwnode_remove_software_node(fwnode->secondary);
527-
set_secondary_fwnode(dev, NULL);
528-
}
529-
}
530-
EXPORT_SYMBOL_GPL(device_remove_properties);
531-
532-
/**
533-
* device_add_properties - Add a collection of properties to a device object.
534-
* @dev: Device to add properties to.
535-
* @properties: Collection of properties to add.
536-
*
537-
* Associate a collection of device properties represented by @properties with
538-
* @dev. The function takes a copy of @properties.
539-
*
540-
* WARNING: The callers should not use this function if it is known that there
541-
* is no real firmware node associated with @dev! In that case the callers
542-
* should create a software node and assign it to @dev directly.
543-
*/
544-
int device_add_properties(struct device *dev,
545-
const struct property_entry *properties)
546-
{
547-
struct fwnode_handle *fwnode;
548-
549-
fwnode = fwnode_create_software_node(properties, NULL);
550-
if (IS_ERR(fwnode))
551-
return PTR_ERR(fwnode);
552-
553-
set_secondary_fwnode(dev, fwnode);
554-
return 0;
555-
}
556-
EXPORT_SYMBOL_GPL(device_add_properties);
557-
558510
/**
559511
* fwnode_get_name - Return the name of a node
560512
* @fwnode: The firmware node

include/linux/property.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,6 @@ property_entries_dup(const struct property_entry *properties);
378378

379379
void property_entries_free(const struct property_entry *properties);
380380

381-
int device_add_properties(struct device *dev,
382-
const struct property_entry *properties);
383-
void device_remove_properties(struct device *dev);
384-
385381
bool device_dma_supported(struct device *dev);
386382

387383
enum dev_dma_attr device_get_dma_attr(struct device *dev);

0 commit comments

Comments
 (0)