coresight: platform: Cleanup coresight connection handling
The platform code parses the component connections and populates a platform-description of the output connections in arrays of fields (which is never freed). This is later copied in the coresight_register to a newly allocated area, represented by coresight_connection(s). This patch cleans up the code dealing with connections by making use of the "coresight_connection" structure right at the platform code and lets the generic driver simply re-use information provided by the platform. Thus making it reader friendly as well as avoiding the wastage of unused memory. Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2058224f54
commit
c2c729415b
@@ -94,20 +94,15 @@ union coresight_dev_subtype {
|
||||
* @cpu: the CPU a source belongs to. Only applicable for ETM/PTMs.
|
||||
* @name: name of the component as shown under sysfs.
|
||||
* @nr_inport: number of input ports for this component.
|
||||
* @outports: list of remote endpoint port number.
|
||||
* @child_names:name of all child components connected to this device.
|
||||
* @child_ports:child component port number the current component is
|
||||
connected to.
|
||||
* @nr_outport: number of output ports for this component.
|
||||
* @conns: Array of nr_outport connections from this component
|
||||
*/
|
||||
struct coresight_platform_data {
|
||||
int cpu;
|
||||
const char *name;
|
||||
int nr_inport;
|
||||
int *outports;
|
||||
const char **child_names;
|
||||
int *child_ports;
|
||||
int nr_outport;
|
||||
struct coresight_connection *conns;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user