Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289230
b: refs/heads/master
c: b4aac48
h: refs/heads/master
v: v3
  • Loading branch information
Víctor Manuel Jáquez Leal authored and Greg Kroah-Hartman committed Mar 9, 2012
1 parent 2d1180b commit ec0c07e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 66 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: 1471d6c69ff7843fb7149218d3afb4d5a2e4426c
refs/heads/master: b4aac487b0db55dcd8587908c129d9dade2bf3df
29 changes: 0 additions & 29 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ struct io_attrs {
* -EINVAL: Invalid DSP word size (must be > 0).
* Invalid base address for DSP communications.
* Requires:
* io_init(void) called.
* io_man != NULL.
* mgr_attrts != NULL.
* Ensures:
Expand All @@ -74,36 +73,8 @@ extern int io_create(struct io_mgr **io_man,
* 0: Success.
* -EFAULT: hio_mgr was invalid.
* Requires:
* io_init(void) called.
* Ensures:
*/
extern int io_destroy(struct io_mgr *hio_mgr);

/*
* ======== io_exit ========
* Purpose:
* Discontinue usage of the IO module.
* Parameters:
* Returns:
* Requires:
* io_init(void) previously called.
* Ensures:
* Resources, if any acquired in io_init(void), are freed when the last
* client of IO calls io_exit(void).
*/
extern void io_exit(void);

/*
* ======== io_init ========
* Purpose:
* Initialize the IO module's private state.
* Parameters:
* Returns:
* TRUE if initialized; FALSE if error occurred.
* Requires:
* Ensures:
* A requirement for each of the other public CHNL functions.
*/
extern bool io_init(void);

#endif /* CHNL_ */
10 changes: 2 additions & 8 deletions trunk/drivers/staging/tidspbridge/pmgr/dspapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ void api_exit(void)
if (api_c_refs == 0) {
/* Release all modules initialized in api_init(). */
dev_exit();
io_exit();
mgr_exit();
}
}
Expand All @@ -281,24 +280,19 @@ void api_exit(void)
bool api_init(void)
{
bool ret = true;
bool fdev, fio;
bool fdev;
bool fmgr;

if (api_c_refs == 0) {
/* initialize driver and other modules */
fmgr = mgr_init();
fio = io_init();
fdev = dev_init();
ret = fdev && fio;
ret = ret && fmgr;
ret = fdev && fmgr;
if (!ret) {

if (fmgr)
mgr_exit();

if (fio)
io_exit();

if (fdev)
dev_exit();
}
Expand Down
28 changes: 0 additions & 28 deletions trunk/drivers/staging/tidspbridge/pmgr/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#include <ioobj.h>
#include <dspbridge/io.h>

/* ----------------------------------- Globals */
static u32 refs;

/*
* ======== io_create ========
* Purpose:
Expand Down Expand Up @@ -94,28 +91,3 @@ int io_destroy(struct io_mgr *hio_mgr)

return status;
}

/*
* ======== io_exit ========
* Purpose:
* Discontinue usage of the IO module.
*/
void io_exit(void)
{
refs--;
}

/*
* ======== io_init ========
* Purpose:
* Initialize the IO module's private state.
*/
bool io_init(void)
{
bool ret = true;

if (ret)
refs++;

return ret;
}

0 comments on commit ec0c07e

Please sign in to comment.