Ignore:
Timestamp:
Aug 7, 2022, 10:54:11 AM (3 years ago)
Author:
Paul Smedley
Message:

Fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/lib32/devres.c

    r615 r716  
    3636};
    3737
     38#define devres_log(dev, node, op)       do {} while (0)
     39
    3840/*
    3941 * Release functions for devres group.  These callbacks are used only
     
    7577
    7678#define devres_log(dev, node, op)       do {} while (0)
     79
     80static void add_dr(struct device *dev, struct devres_node *node)
     81{
     82        devres_log(dev, node, "ADD");
     83        BUG_ON(!list_empty(&node->entry));
     84//#ifndef TARGET_OS2
     85        /* Traps here on OS/2 */
     86        list_add_tail(&node->entry, &dev->devres_head);
     87//#endif
     88}
     89
     90/**
     91 * devres_add - Register device resource
     92 * @dev: Device to add resource to
     93 * @res: Resource to register
     94 *
     95 * Register devres @res to @dev.  @res should have been allocated
     96 * using devres_alloc().  On driver detach, the associated release
     97 * function will be invoked and devres will be freed automatically.
     98 */
     99void devres_add(struct device *dev, void *res)
     100{
     101        /* Traps here on OS/2 */
     102        struct devres *dr = container_of(res, struct devres, data);
     103        unsigned long flags;
     104        spin_lock_irqsave(&dev->devres_lock, flags);
     105        add_dr(dev, &dr->node);
     106        spin_unlock_irqrestore(&dev->devres_lock, flags);
     107}
    77108
    78109/**
     
    273304        return NULL;
    274305}
     306
     307/**
     308 * devm_add_action() - add a custom action to list of managed resources
     309 * @dev: Device that owns the action
     310 * @action: Function that should be called
     311 * @data: Pointer to data passed to @action implementation
     312 *
     313 * This adds a custom action to the list of managed resources so that
     314 * it gets executed as part of standard resource unwinding.
     315 */
     316int devm_add_action(struct device *dev, void (*action)(void *), void *data)
     317{
     318        return 0;
     319}
     320
     321/**
     322 * devm_remove_action() - removes previously added custom action
     323 * @dev: Device that owns the action
     324 * @action: Function implementing the action
     325 * @data: Pointer to data passed to @action implementation
     326 *
     327 * Removes instance of @action previously added by devm_add_action().
     328 * Both action and data should match one of the existing entries.
     329 */
     330void devm_remove_action(struct device *dev, void (*action)(void *), void *data)
     331{
     332}
Note: See TracChangeset for help on using the changeset viewer.