Commit c3ce79d6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull component updates from Russell King:
 "Updates for the component helper merged last year.

  This update removes the old add_components method of detecting and
  looking up the components associated with a master device.  Last time
  I checked during the 4.4-rc cycle, there were no users of the old
  interfaces, as has been the case for some time now.  Breakage due to
  conflicting development is possible, in which case this pull will have
  to be reverted - however, these changes have been in linux-next since
  Dec 7th without any problems reported.

  Removal of that then allows us to change the way we track components
  internally, allowing us to release data that has been used for
  matching at the appropriate time, thereby allowing any resource leaks
  caused by that missing functionality to be resolved"

* 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  component: add support for releasing match data
  component: track components via array rather than list
  component: move check for unbound master into try_to_bring_up_masters()
  component: remove old add_components method
parents 01e9d226 ce657b1c
This diff is collapsed.
#ifndef COMPONENT_H
#define COMPONENT_H
#include <linux/stddef.h>
struct device;
struct component_ops {
int (*bind)(struct device *, struct device *, void *);
void (*unbind)(struct device *, struct device *, void *);
int (*bind)(struct device *comp, struct device *master,
void *master_data);
void (*unbind)(struct device *comp, struct device *master,
void *master_data);
};
int component_add(struct device *, const struct component_ops *);
void component_del(struct device *, const struct component_ops *);
int component_bind_all(struct device *, void *);
void component_unbind_all(struct device *, void *);
int component_bind_all(struct device *master, void *master_data);
void component_unbind_all(struct device *master, void *master_data);
struct master;
struct component_master_ops {
int (*add_components)(struct device *, struct master *);
int (*bind)(struct device *);
void (*unbind)(struct device *);
int (*bind)(struct device *master);
void (*unbind)(struct device *master);
};
int component_master_add(struct device *, const struct component_master_ops *);
void component_master_del(struct device *,
const struct component_master_ops *);
int component_master_add_child(struct master *master,
int (*compare)(struct device *, void *), void *compare_data);
struct component_match;
int component_master_add_with_match(struct device *,
const struct component_master_ops *, struct component_match *);
void component_match_add(struct device *, struct component_match **,
void component_match_add_release(struct device *master,
struct component_match **matchptr,
void (*release)(struct device *, void *),
int (*compare)(struct device *, void *), void *compare_data);
static inline void component_match_add(struct device *master,
struct component_match **matchptr,
int (*compare)(struct device *, void *), void *compare_data)
{
component_match_add_release(master, matchptr, NULL, compare,
compare_data);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment