Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219635
b: refs/heads/master
c: a47d4de
h: refs/heads/master
i:
  219633: 6759618
  219631: 0a767f6
v: v3
  • Loading branch information
Ivan Gomez Castellanos authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent 12c9ec4 commit 9920d0f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73b87a916697999bfafd4c43956ba98a2905ecfe
refs/heads/master: a47d4deebf3ecf6c092a9c510af7ccbaedc1610a
19 changes: 0 additions & 19 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,6 @@ extern void cfg_get_perf_value(bool *enable_perf);
extern int cfg_get_zl_file(struct cfg_devnode *dev_node_obj,
u32 buf_size, char *str_zl_file_name);

/*
* ======== cfg_set_dev_object ========
* Purpose:
* Store the Device Object handle for a given devnode.
* Parameters:
* dev_node_obj: Platform's dev_node handle we are storing value with.
* value: Arbitrary value to store.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid.
* -EPERM: Internal Error.
* Requires:
* CFG initialized.
* Ensures:
* 0: The Private u32 was successfully set.
*/
extern int cfg_set_dev_object(struct cfg_devnode *dev_node_obj,
u32 value);

/*
* ======== CFG_SetDrvObject ========
* Purpose:
Expand Down
28 changes: 16 additions & 12 deletions trunk/drivers/staging/tidspbridge/pmgr/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
char bridge_file_name[CFG_MAXSEARCHPATHLEN] = "UMA";
int status;
struct mgr_object *hmgr_obj = NULL;
struct drv_data *drv_datap = dev_get_drvdata(bridge);

DBC_REQUIRE(refs > 0);

Expand All @@ -906,24 +907,27 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
dev_node_obj);
if (!status) {
/* Store away the hdev_obj with the DEVNODE */
status = cfg_set_dev_object(dev_node_obj, (u32) hdev_obj);
if (!drv_datap || !dev_node_obj) {
status = -EFAULT;
pr_err("%s: Failed, status 0x%x\n", __func__, status);
} else if (!(strcmp((char *)dev_node_obj, "TIOMAP1510"))) {
drv_datap->dev_object = (void *) hdev_obj;
}
if (!status) {
/* Create the Manager Object */
status = mgr_create(&hmgr_obj, dev_node_obj);
if (status && !(strcmp((char *)dev_node_obj,
"TIOMAP1510"))) {
/* Ensure the device extension is NULL */
drv_datap->dev_object = NULL;
}
}
if (status) {
/* Clean up */
dev_destroy_device(hdev_obj);
hdev_obj = NULL;
}
}
if (!status) {
/* Create the Manager Object */
status = mgr_create(&hmgr_obj, dev_node_obj);
}
if (status) {
if (hdev_obj)
dev_destroy_device(hdev_obj);

/* Ensure the device extension is NULL */
cfg_set_dev_object(dev_node_obj, 0L);
}

return status;
}
Expand Down
30 changes: 0 additions & 30 deletions trunk/drivers/staging/tidspbridge/services/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,6 @@
#include <dspbridge/cfg.h>
#include <dspbridge/drv.h>

/*
* ======== cfg_set_dev_object ========
* Purpose:
* Store the Device Object handle and dev_node pointer for a given devnode.
*/
int cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 value)
{
int status = 0;
struct drv_data *drv_datap = dev_get_drvdata(bridge);

if (!drv_datap) {
pr_err("%s: Failed, status 0x%x\n", __func__, status);
return -EPERM;
}

if (!dev_node_obj)
status = -EFAULT;

if (!status) {
/* Store the Bridge device object in the Registry */

if (!(strcmp((char *)dev_node_obj, "TIOMAP1510")))
drv_datap->dev_object = (void *) value;
}
if (status)
pr_err("%s: Failed, status 0x%x\n", __func__, status);

return status;
}

/*
* ======== cfg_set_object ========
* Purpose:
Expand Down

0 comments on commit 9920d0f

Please sign in to comment.