mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/11] staging: tidspbridge: Remove services directory
@ 2010-08-25 22:08 Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 01/11] staging: tidspbridge: Move sync.c from services to core Ivan Gomez Castellanos
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

Most of the functions defined in the files of the services directory are
already implemented in the kernel. Other functions are only wrappers or
just do a simple thing, such as reading or assigning a value.

Ivan Gomez Castellanos (11):
  staging: tidspbridge: Move sync.c from services to core
  staging: tidspbridge: Remove ntfy.c
  staging: tidspbridge: Remove cfg_get_auto_start()
  staging: tidspbridge: Remove cfg_init() and cfg_exit()
  staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial
    cleanup
  staging: tidspbridge: Remove cfg_get_exec_file()
  staging: tidspbridge: Remove cfg_get_object()
  staging: tidspbridge: Remove cfg_set_dev_object()
  staging: tidspbridge: Remove cfg_set_object()
  staging: tidspbridge: Remove cfg.c and cfg.h files
  staging: tidspbridge: Remove services.c and services.h

 drivers/staging/tidspbridge/Makefile               |    4 +-
 drivers/staging/tidspbridge/core/chnl_sm.c         |    1 -
 drivers/staging/tidspbridge/core/dsp-clock.c       |    1 -
 drivers/staging/tidspbridge/core/io_sm.c           |    1 -
 .../staging/tidspbridge/{services => core}/sync.c  |   17 ++
 drivers/staging/tidspbridge/core/tiomap3430.c      |    1 -
 drivers/staging/tidspbridge/core/tiomap3430_pwr.c  |    4 +-
 drivers/staging/tidspbridge/core/tiomap_io.c       |    1 -
 .../staging/tidspbridge/include/dspbridge/cfg.h    |  222 -----------------
 .../tidspbridge/include/dspbridge/services.h       |   50 ----
 drivers/staging/tidspbridge/pmgr/chnl.c            |    1 -
 drivers/staging/tidspbridge/pmgr/cmm.c             |    1 -
 drivers/staging/tidspbridge/pmgr/dev.c             |   69 ++++--
 drivers/staging/tidspbridge/pmgr/dspapi.c          |   12 +-
 drivers/staging/tidspbridge/pmgr/io.c              |    3 -
 drivers/staging/tidspbridge/rmgr/drv.c             |   59 ++++-
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |   14 +-
 drivers/staging/tidspbridge/rmgr/dspdrv.c          |   12 +-
 drivers/staging/tidspbridge/rmgr/mgr.c             |   52 ++++-
 drivers/staging/tidspbridge/rmgr/node.c            |    1 -
 drivers/staging/tidspbridge/rmgr/proc.c            |   48 +++-
 drivers/staging/tidspbridge/rmgr/strm.c            |    1 -
 drivers/staging/tidspbridge/services/cfg.c         |  253 --------------------
 drivers/staging/tidspbridge/services/ntfy.c        |   31 ---
 drivers/staging/tidspbridge/services/services.c    |   70 ------
 25 files changed, 210 insertions(+), 719 deletions(-)
 rename drivers/staging/tidspbridge/{services => core}/sync.c (85%)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/cfg.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/services.h
 delete mode 100644 drivers/staging/tidspbridge/services/cfg.c
 delete mode 100644 drivers/staging/tidspbridge/services/ntfy.c
 delete mode 100644 drivers/staging/tidspbridge/services/services.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 01/11] staging: tidspbridge: Move sync.c from services to core
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 02/11] staging: tidspbridge: Remove ntfy.c Ivan Gomez Castellanos
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, the file sync.c is moved
from services to core.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 drivers/staging/tidspbridge/Makefile               |    4 ++--
 .../staging/tidspbridge/{services => core}/sync.c  |    0
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/staging/tidspbridge/{services => core}/sync.c (100%)

diff --git a/drivers/staging/tidspbridge/Makefile b/drivers/staging/tidspbridge/Makefile
index 6567172..50be983 100644
--- a/drivers/staging/tidspbridge/Makefile
+++ b/drivers/staging/tidspbridge/Makefile
@@ -1,11 +1,11 @@
 obj-$(CONFIG_TIDSPBRIDGE)	+= bridgedriver.o
 
 libgen = gen/gb.o gen/gs.o gen/gh.o gen/uuidutil.o
-libservices = services/sync.o services/cfg.o \
+libservices = services/cfg.o \
 		services/ntfy.o services/services.o
 libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
 		core/tiomap3430_pwr.o core/tiomap_io.o \
-		core/ue_deh.o core/wdt.o core/dsp-clock.o
+		core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o
 libpmgr = pmgr/chnl.o pmgr/io.o pmgr/msg.o pmgr/cod.o pmgr/dev.o pmgr/dspapi.o \
 		pmgr/dmm.o pmgr/cmm.o pmgr/dbll.o
 librmgr = rmgr/dbdcd.o rmgr/disp.o rmgr/drv.o rmgr/mgr.o rmgr/node.o \
diff --git a/drivers/staging/tidspbridge/services/sync.c b/drivers/staging/tidspbridge/core/sync.c
similarity index 100%
rename from drivers/staging/tidspbridge/services/sync.c
rename to drivers/staging/tidspbridge/core/sync.c
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 02/11] staging: tidspbridge: Remove ntfy.c
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 01/11] staging: tidspbridge: Move sync.c from services to core Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 03/11] staging: tidspbridge: Remove cfg_get_auto_start() Ivan Gomez Castellanos
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, this patch is needed.

ntfy.c only contained the function dsp_notifier_event(), and since this
function calls sync_set_event(), then the dsp_notifier_event() is moved
to the sync.c file.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 drivers/staging/tidspbridge/Makefile        |    2 +-
 drivers/staging/tidspbridge/core/sync.c     |   17 ++++++++++++++
 drivers/staging/tidspbridge/services/ntfy.c |   31 ---------------------------
 3 files changed, 18 insertions(+), 32 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/services/ntfy.c

diff --git a/drivers/staging/tidspbridge/Makefile b/drivers/staging/tidspbridge/Makefile
index 50be983..8a13982 100644
--- a/drivers/staging/tidspbridge/Makefile
+++ b/drivers/staging/tidspbridge/Makefile
@@ -2,7 +2,7 @@ obj-$(CONFIG_TIDSPBRIDGE)	+= bridgedriver.o
 
 libgen = gen/gb.o gen/gs.o gen/gh.o gen/uuidutil.o
 libservices = services/cfg.o \
-		services/ntfy.o services/services.o
+		services/services.o
 libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
 		core/tiomap3430_pwr.o core/tiomap_io.o \
 		core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o
diff --git a/drivers/staging/tidspbridge/core/sync.c b/drivers/staging/tidspbridge/core/sync.c
index 9010b37..995986a 100644
--- a/drivers/staging/tidspbridge/core/sync.c
+++ b/drivers/staging/tidspbridge/core/sync.c
@@ -21,6 +21,7 @@
 
 /*  ----------------------------------- This */
 #include <dspbridge/sync.h>
+#include <dspbridge/ntfy.h>
 
 DEFINE_SPINLOCK(sync_lock);
 
@@ -102,3 +103,19 @@ func_end:
 	return status;
 }
 
+/**
+ * dsp_notifier_event() - callback function to nofity events
+ * @this:		pointer to itself struct notifier_block
+ * @event:	event to be notified.
+ * @data:		Currently not used.
+ *
+ */
+int dsp_notifier_event(struct notifier_block *this, unsigned long event,
+							void *data)
+{
+	struct  ntfy_event *ne = container_of(this, struct ntfy_event,
+							noti_block);
+	if (ne->event & event)
+		sync_set_event(&ne->sync_obj);
+	return NOTIFY_OK;
+}
diff --git a/drivers/staging/tidspbridge/services/ntfy.c b/drivers/staging/tidspbridge/services/ntfy.c
deleted file mode 100644
index a2ea698..0000000
--- a/drivers/staging/tidspbridge/services/ntfy.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * ntfy.c
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Manage lists of notification events.
- *
- * Copyright (C) 2005-2006 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*  ----------------------------------- This */
-#include <dspbridge/ntfy.h>
-
-int dsp_notifier_event(struct notifier_block *this, unsigned long event,
-			   void *data)
-{
-	struct  ntfy_event *ne = container_of(this, struct ntfy_event,
-							noti_block);
-	if (ne->event & event)
-		sync_set_event(&ne->sync_obj);
-	return NOTIFY_OK;
-}
-
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 03/11] staging: tidspbridge: Remove cfg_get_auto_start()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 01/11] staging: tidspbridge: Move sync.c from services to core Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 02/11] staging: tidspbridge: Remove ntfy.c Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 04/11] staging: tidspbridge: Remove cfg_init() and cfg_exit() Ivan Gomez Castellanos
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, this patch is needed.

The function cfg_get_auto_start() only assigns a value to the flag
tmp, and it is only called by the function api_init_complete2(). So
the function cfg_get_auto_start() is not required.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   19 --------------
 drivers/staging/tidspbridge/pmgr/dspapi.c          |   10 ++++---
 drivers/staging/tidspbridge/services/cfg.c         |   26 --------------------
 3 files changed, 6 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 05a8999..a84fa2b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -35,25 +35,6 @@
 extern void cfg_exit(void);
 
 /*
- *  ======== cfg_get_auto_start ========
- *  Purpose:
- *      Retreive the autostart mask, if any, for this board.
- *  Parameters:
- *      dev_node_obj:  Handle to the dev_node who's driver we are querying.
- *      auto_start:   Ptr to location for 32 bit autostart mask.
- *  Returns:
- *      0:                Success.
- *      -EFAULT:  dev_node_obj is invalid.
- *      -ENODATA: Unable to retreive resource.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:        *auto_start contains autostart mask for this devnode.
- */
-extern int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
-				     u32 *auto_start);
-
-/*
  *  ======== cfg_get_cd_version ========
  *  Purpose:
  *      Retrieves the version of the PM Class Driver.
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 7b42f72..d9bb3ea 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -381,8 +381,8 @@ int api_init_complete2(void)
 	int status = 0;
 	struct cfg_devnode *dev_node;
 	struct dev_object *hdev_obj;
+	struct drv_data *drv_datap;
 	u8 dev_type;
-	u32 tmp;
 
 	DBC_REQUIRE(api_c_refs > 0);
 
@@ -397,10 +397,12 @@ int api_init_complete2(void)
 		if (dev_get_dev_type(hdev_obj, &dev_type))
 			continue;
 
-		if ((dev_type == DSP_UNIT) || (dev_type == IVA_UNIT))
-			if (cfg_get_auto_start(dev_node, &tmp) == 0
-									&& tmp)
+		if ((dev_type == DSP_UNIT) || (dev_type == IVA_UNIT)) {
+			drv_datap = dev_get_drvdata(bridge);
+
+			if (drv_datap && drv_datap->base_img)
 				proc_auto_start(dev_node, hdev_obj);
+		}
 	}
 
 	return status;
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index a7af74f..e9cdbf6 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -46,32 +46,6 @@ void cfg_exit(void)
 }
 
 /*
- *  ======== cfg_get_auto_start ========
- *  Purpose:
- *      Retreive the autostart mask, if any, for this board.
- */
-int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
-			      u32 *auto_start)
-{
-	int status = 0;
-	u32 dw_buf_size;
-	struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
-	dw_buf_size = sizeof(*auto_start);
-	if (!dev_node_obj)
-		status = -EFAULT;
-	if (!auto_start || !drv_datap)
-		status = -EFAULT;
-	if (!status)
-		*auto_start = (drv_datap->base_img) ? 1 : 0;
-
-	DBC_ENSURE((status == 0 &&
-		    (*auto_start == 0 || *auto_start == 1))
-		   || status != 0);
-	return status;
-}
-
-/*
  *  ======== cfg_get_dev_object ========
  *  Purpose:
  *      Retrieve the Device Object handle for a given devnode.
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 04/11] staging: tidspbridge: Remove cfg_init() and cfg_exit()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (2 preceding siblings ...)
  2010-08-25 22:08 ` [PATCH 03/11] staging: tidspbridge: Remove cfg_get_auto_start() Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 05/11] staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup Ivan Gomez Castellanos
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

The functions cfg_init() and cfg_exit() do nothing, so they are removed.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   26 --------------------
 drivers/staging/tidspbridge/services/cfg.c         |   20 ---------------
 drivers/staging/tidspbridge/services/services.c    |   12 ---------
 3 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index a84fa2b..eea9000 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -22,19 +22,6 @@
 #include <dspbridge/cfgdefs.h>
 
 /*
- *  ======== cfg_exit ========
- *  Purpose:
- *      Discontinue usage of the CFG module.
- *  Parameters:
- *  Returns:
- *  Requires:
- *      cfg_init(void) was previously called.
- *  Ensures:
- *      Resources acquired in cfg_init(void) are freed.
- */
-extern void cfg_exit(void);
-
-/*
  *  ======== cfg_get_cd_version ========
  *  Purpose:
  *      Retrieves the version of the PM Class Driver.
@@ -152,19 +139,6 @@ extern int cfg_get_zl_file(struct cfg_devnode *dev_node_obj,
 				  u32 buf_size, char *str_zl_file_name);
 
 /*
- *  ======== cfg_init ========
- *  Purpose:
- *      Initialize the CFG module's private state.
- *  Parameters:
- *  Returns:
- *      TRUE if initialized; FALSE if error occured.
- *  Requires:
- *  Ensures:
- *      A requirement for each of the other public CFG functions.
- */
-extern bool cfg_init(void);
-
-/*
  *  ======== cfg_set_dev_object ========
  *  Purpose:
  *      Store the Device Object handle for a given devnode.
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index e9cdbf6..b9c3882 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -36,16 +36,6 @@ struct drv_ext {
 };
 
 /*
- *  ======== cfg_exit ========
- *  Purpose:
- *      Discontinue usage of the CFG module.
- */
-void cfg_exit(void)
-{
-	/* Do nothing */
-}
-
-/*
  *  ======== cfg_get_dev_object ========
  *  Purpose:
  *      Retrieve the Device Object handle for a given devnode.
@@ -157,16 +147,6 @@ int cfg_get_object(u32 *value, u8 dw_type)
 }
 
 /*
- *  ======== cfg_init ========
- *  Purpose:
- *      Initialize the CFG module's private state.
- */
-bool cfg_init(void)
-{
-	return true;
-}
-
-/*
  *  ======== cfg_set_dev_object ========
  *  Purpose:
  *      Store the Device Object handle and dev_node pointer for a given devnode.
diff --git a/drivers/staging/tidspbridge/services/services.c b/drivers/staging/tidspbridge/services/services.c
index 6a7dd6f..47bac21 100644
--- a/drivers/staging/tidspbridge/services/services.c
+++ b/drivers/staging/tidspbridge/services/services.c
@@ -43,7 +43,6 @@
  */
 void services_exit(void)
 {
-	cfg_exit();
 }
 
 /*
@@ -54,17 +53,6 @@ void services_exit(void)
 bool services_init(void)
 {
 	bool ret = true;
-	bool fcfg;
-
-	/* Perform required initialization of SERVICES modules. */
-	fcfg = cfg_init();
-
-	ret = fcfg;
-
-	if (!ret) {
-		if (fcfg)
-			cfg_exit();
-	}
 
 	return ret;
 }
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 05/11] staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (3 preceding siblings ...)
  2010-08-25 22:08 ` [PATCH 04/11] staging: tidspbridge: Remove cfg_init() and cfg_exit() Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:08 ` [PATCH 06/11] staging: tidspbridge: Remove cfg_get_exec_file() Ivan Gomez Castellanos
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

The cfg_get_dev_object function is only used in one place and because of
its simplicity, it can be removed.

The parameter *value can be left uninitialized if the strcmp() returns a
nonzero value, so in the function dev_remove_device(), the hdev_obj could
be used uninitialized and could be dereferenced in dev_destroy_device().
This patch fixes this issue, and also removes the dev_obj pointer which
is not used.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   21 ----------
 drivers/staging/tidspbridge/pmgr/dev.c             |   30 +++++++++++---
 drivers/staging/tidspbridge/services/cfg.c         |   41 --------------------
 3 files changed, 24 insertions(+), 68 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index eea9000..9a259a1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -41,27 +41,6 @@
 extern int cfg_get_cd_version(u32 *version);
 
 /*
- *  ======== cfg_get_dev_object ========
- *  Purpose:
- *      Retrieve the Device Object handle for a given devnode.
- *  Parameters:
- *      dev_node_obj:	Platform's dev_node handle from which to retrieve
- *      		value.
- *      value:          Ptr to location to store the value.
- *  Returns:
- *      0:                Success.
- *      -EFAULT: dev_node_obj is invalid or device_obj is invalid.
- *      -ENODATA: The resource is not available.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:    *value is set to the retrieved u32.
- *      else:       *value is set to 0L.
- */
-extern int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
-				     u32 *value);
-
-/*
  *  ======== cfg_get_exec_file ========
  *  Purpose:
  *      Retreive the default executable, if any, for this board.
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 4ddf03d..7893f9a 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -85,6 +85,11 @@ struct dev_object {
 	struct node_mgr *hnode_mgr;
 };
 
+struct drv_ext {
+	struct list_head link;
+	char sz_string[MAXREGPATHLENGTH];
+};
+
 /*  ----------------------------------- Globals */
 static u32 refs;		/* Module reference count */
 
@@ -812,18 +817,31 @@ int dev_remove_device(struct cfg_devnode *dev_node_obj)
 {
 	struct dev_object *hdev_obj;	/* handle to device object */
 	int status = 0;
-	struct dev_object *dev_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
+
+	if (!drv_datap)
+		status = -ENODATA;
+
+	if (!dev_node_obj)
+		status = -EFAULT;
 
 	/* Retrieve the device object handle originaly stored with
 	 * the dev_node: */
-	status = cfg_get_dev_object(dev_node_obj, (u32 *) &hdev_obj);
 	if (!status) {
-		/* Remove the Processor List */
-		dev_obj = (struct dev_object *)hdev_obj;
-		/* Destroy the device object. */
-		status = dev_destroy_device(hdev_obj);
+		/* check the device string and then store dev object */
+		if (!strcmp((char *)((struct drv_ext *)dev_node_obj)->sz_string,
+								"TIOMAP1510")) {
+			hdev_obj = drv_datap->dev_object;
+			/* Destroy the device object. */
+			status = dev_destroy_device(hdev_obj);
+		} else {
+			status = -EPERM;
+		}
 	}
 
+	if (status)
+		pr_err("%s: Failed, status 0x%x\n", __func__, status);
+
 	return status;
 }
 
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index b9c3882..587c71a 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -30,47 +30,6 @@
 #include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 
-struct drv_ext {
-	struct list_head link;
-	char sz_string[MAXREGPATHLENGTH];
-};
-
-/*
- *  ======== cfg_get_dev_object ========
- *  Purpose:
- *      Retrieve the Device Object handle for a given devnode.
- */
-int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
-			      u32 *value)
-{
-	int status = 0;
-	u32 dw_buf_size;
-	struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
-	if (!drv_datap)
-		status = -EPERM;
-
-	if (!dev_node_obj)
-		status = -EFAULT;
-
-	if (!value)
-		status = -EFAULT;
-
-	dw_buf_size = sizeof(value);
-	if (!status) {
-
-		/* check the device string and then store dev object */
-		if (!
-		    (strcmp
-		     ((char *)((struct drv_ext *)dev_node_obj)->sz_string,
-		      "TIOMAP1510")))
-			*value = (u32)drv_datap->dev_object;
-	}
-	if (status)
-		pr_err("%s: Failed, status 0x%x\n", __func__, status);
-	return status;
-}
-
 /*
  *  ======== cfg_get_exec_file ========
  *  Purpose:
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 06/11] staging: tidspbridge: Remove cfg_get_exec_file()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (4 preceding siblings ...)
  2010-08-25 22:08 ` [PATCH 05/11] staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup Ivan Gomez Castellanos
@ 2010-08-25 22:08 ` Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 07/11] staging: tidspbridge: Remove cfg_get_object() Ivan Gomez Castellanos
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:08 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, the cfg_get_exec_file
function has also to be removed.

This patch also avoids a possible NULL pointer dereference in function
cfg_get_exec_file(), when drv_datap is checked for NULL and then pass
drv_datap->base_img as argument to strlen().

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   22 --------------
 drivers/staging/tidspbridge/rmgr/proc.c            |   27 ++++++++++++-----
 drivers/staging/tidspbridge/services/cfg.c         |   31 --------------------
 3 files changed, 19 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 9a259a1..11f5bde 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -41,28 +41,6 @@
 extern int cfg_get_cd_version(u32 *version);
 
 /*
- *  ======== cfg_get_exec_file ========
- *  Purpose:
- *      Retreive the default executable, if any, for this board.
- *  Parameters:
- *      dev_node_obj: Handle to the dev_node who's driver we are querying.
- *      buf_size:       Size of buffer.
- *      str_exec_file:  Ptr to character buf to hold ExecFile.
- *  Returns:
- *      0:                Success.
- *      -EFAULT:  dev_node_obj is invalid or str_exec_file is invalid.
- *      -ENODATA: The resource is not available.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:    Not more than buf_size bytes were copied into str_exec_file,
- *                  and *str_exec_file contains default executable for this
- *                  devnode.
- */
-extern int cfg_get_exec_file(struct cfg_devnode *dev_node_obj,
-				    u32 buf_size, char *str_exec_file);
-
-/*
  *  ======== cfg_get_object ========
  *  Purpose:
  *      Retrieve the Driver Object handle From the Registry
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 44c26e1..0a7e30b 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -393,18 +393,29 @@ static int get_exec_file(struct cfg_devnode *dev_node_obj,
 {
 	u8 dev_type;
 	s32 len;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	dev_get_dev_type(hdev_obj, (u8 *) &dev_type);
+
+	if (!exec_file)
+		return -EFAULT;
+
 	if (dev_type == DSP_UNIT) {
-		return cfg_get_exec_file(dev_node_obj, size, exec_file);
-	} else if (dev_type == IVA_UNIT) {
-		if (iva_img) {
-			len = strlen(iva_img);
-			strncpy(exec_file, iva_img, len + 1);
-			return 0;
-		}
+		if (!drv_datap || !drv_datap->base_img)
+			return -EFAULT;
+
+		if (strlen(drv_datap->base_img) > size)
+			return -EINVAL;
+
+		strcpy(exec_file, drv_datap->base_img);
+	} else if (dev_type == IVA_UNIT && iva_img) {
+		len = strlen(iva_img);
+		strncpy(exec_file, iva_img, len + 1);
+	} else {
+		return -ENOENT;
 	}
-	return -ENOENT;
+
+	return 0;
 }
 
 /*
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 587c71a..302eadd 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -31,37 +31,6 @@
 #include <dspbridge/drv.h>
 
 /*
- *  ======== cfg_get_exec_file ========
- *  Purpose:
- *      Retreive the default executable, if any, for this board.
- */
-int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 buf_size,
-			     char *str_exec_file)
-{
-	int status = 0;
-	struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
-	if (!dev_node_obj)
-		status = -EFAULT;
-
-	else if (!str_exec_file || !drv_datap)
-		status = -EFAULT;
-
-	if (strlen(drv_datap->base_img) > buf_size)
-		status = -EINVAL;
-
-	if (!status && drv_datap->base_img)
-		strcpy(str_exec_file, drv_datap->base_img);
-
-	if (status)
-		pr_err("%s: Failed, status 0x%x\n", __func__, status);
-	DBC_ENSURE(((status == 0) &&
-		    (strlen(str_exec_file) <= buf_size))
-		   || (status != 0));
-	return status;
-}
-
-/*
  *  ======== cfg_get_object ========
  *  Purpose:
  *      Retrieve the Object handle from the Registry
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 07/11] staging: tidspbridge: Remove cfg_get_object()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (5 preceding siblings ...)
  2010-08-25 22:08 ` [PATCH 06/11] staging: tidspbridge: Remove cfg_get_exec_file() Ivan Gomez Castellanos
@ 2010-08-25 22:09 ` Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 08/11] staging: tidspbridge: Remove cfg_set_dev_object() Ivan Gomez Castellanos
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, the cfg_get_object
function has also to be removed.

Since the driver object handle is retrieved from the drv_data structure,
then the word "Registry" is replaced by "driver data" in the comments.

Also, the hdrv_obj is not used in function omap34_xx_bridge_remove(), so
it is removed.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   17 --------
 drivers/staging/tidspbridge/pmgr/dev.c             |   10 ++++-
 drivers/staging/tidspbridge/rmgr/drv.c             |   34 ++++++++++++---
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |    9 +++-
 drivers/staging/tidspbridge/rmgr/dspdrv.c          |    9 +++-
 drivers/staging/tidspbridge/rmgr/mgr.c             |   28 ++++++++++---
 drivers/staging/tidspbridge/rmgr/proc.c            |   20 +++++++--
 drivers/staging/tidspbridge/services/cfg.c         |   44 --------------------
 8 files changed, 85 insertions(+), 86 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 11f5bde..834b25b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -41,23 +41,6 @@
 extern int cfg_get_cd_version(u32 *version);
 
 /*
- *  ======== cfg_get_object ========
- *  Purpose:
- *      Retrieve the Driver Object handle From the Registry
- *  Parameters:
- *      value:      Ptr to location to store the value.
- *      dw_type      Type of Object to Get
- *  Returns:
- *      0:    Success.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:    *value is set to the retrieved u32(non-Zero).
- *      else:       *value is set to 0L.
- */
-extern int cfg_get_object(u32 *value, u8 dw_type);
-
-/*
  *  ======== cfg_get_perf_value ========
  *  Purpose:
  *      Retrieve a flag indicating whether PERF should log statistics for the
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 7893f9a..8077bdc 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -148,6 +148,7 @@ int dev_create_device(struct dev_object **device_obj,
 	struct io_attrs io_mgr_attrs;
 	u32 num_windows;
 	struct drv_object *hdrv_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 	int status = 0;
 	DBC_REQUIRE(refs > 0);
 	DBC_REQUIRE(device_obj != NULL);
@@ -163,10 +164,15 @@ int dev_create_device(struct dev_object **device_obj,
 
 	/*  Get the Bridge driver interface functions */
 	bridge_drv_entry(&drv_fxns, driver_file_name);
-	if (cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT)) {
-		/* don't propogate CFG errors from this PROC function */
+
+	/* Retrieve the Object handle from the driver data */
+	if (drv_datap && drv_datap->drv_object) {
+		hdrv_obj = drv_datap->drv_object;
+	} else {
 		status = -EPERM;
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 	}
+
 	/* Create the device object, and pass a handle to the Bridge driver for
 	 * storage. */
 	if (!status) {
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 8a8dea6..fc1f49b 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -438,11 +438,15 @@ u32 drv_get_first_dev_object(void)
 {
 	u32 dw_dev_object = 0;
 	struct drv_object *pdrv_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
-	if (!cfg_get_object((u32 *) &pdrv_obj, REG_DRV_OBJECT)) {
+	if (drv_datap && drv_datap->drv_object) {
+		pdrv_obj = drv_datap->drv_object;
 		if ((pdrv_obj->dev_list != NULL) &&
 		    !LST_IS_EMPTY(pdrv_obj->dev_list))
 			dw_dev_object = (u32) lst_first(pdrv_obj->dev_list);
+	} else {
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 	}
 
 	return dw_dev_object;
@@ -458,14 +462,17 @@ u32 drv_get_first_dev_extension(void)
 {
 	u32 dw_dev_extension = 0;
 	struct drv_object *pdrv_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
-	if (!cfg_get_object((u32 *) &pdrv_obj, REG_DRV_OBJECT)) {
-
+	if (drv_datap && drv_datap->drv_object) {
+		pdrv_obj = drv_datap->drv_object;
 		if ((pdrv_obj->dev_node_string != NULL) &&
 		    !LST_IS_EMPTY(pdrv_obj->dev_node_string)) {
 			dw_dev_extension =
 			    (u32) lst_first(pdrv_obj->dev_node_string);
 		}
+	} else {
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 	}
 
 	return dw_dev_extension;
@@ -482,18 +489,22 @@ u32 drv_get_next_dev_object(u32 hdev_obj)
 {
 	u32 dw_next_dev_object = 0;
 	struct drv_object *pdrv_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(hdev_obj != 0);
 
-	if (!cfg_get_object((u32 *) &pdrv_obj, REG_DRV_OBJECT)) {
-
+	if (drv_datap && drv_datap->drv_object) {
+		pdrv_obj = drv_datap->drv_object;
 		if ((pdrv_obj->dev_list != NULL) &&
 		    !LST_IS_EMPTY(pdrv_obj->dev_list)) {
 			dw_next_dev_object = (u32) lst_next(pdrv_obj->dev_list,
 							    (struct list_head *)
 							    hdev_obj);
 		}
+	} else {
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 	}
+
 	return dw_next_dev_object;
 }
 
@@ -509,16 +520,20 @@ u32 drv_get_next_dev_extension(u32 dev_extension)
 {
 	u32 dw_dev_extension = 0;
 	struct drv_object *pdrv_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(dev_extension != 0);
 
-	if (!cfg_get_object((u32 *) &pdrv_obj, REG_DRV_OBJECT)) {
+	if (drv_datap && drv_datap->drv_object) {
+		pdrv_obj = drv_datap->drv_object;
 		if ((pdrv_obj->dev_node_string != NULL) &&
 		    !LST_IS_EMPTY(pdrv_obj->dev_node_string)) {
 			dw_dev_extension =
 			    (u32) lst_next(pdrv_obj->dev_node_string,
 					   (struct list_head *)dev_extension);
 		}
+	} else {
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 	}
 
 	return dw_dev_extension;
@@ -616,6 +631,7 @@ int drv_request_resources(u32 dw_context, u32 *dev_node_strg)
 	int status = 0;
 	struct drv_object *pdrv_object;
 	struct drv_ext *pszdev_node;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(dw_context != 0);
 	DBC_REQUIRE(dev_node_strg != NULL);
@@ -626,7 +642,11 @@ int drv_request_resources(u32 dw_context, u32 *dev_node_strg)
 	 *  list.
 	 */
 
-	status = cfg_get_object((u32 *) &pdrv_object, REG_DRV_OBJECT);
+	if (!drv_datap || !drv_datap->drv_object)
+		status = -ENODATA;
+	else
+		pdrv_object = drv_datap->drv_object;
+
 	if (!status) {
 		pszdev_node = kzalloc(sizeof(struct drv_ext), GFP_KERNEL);
 		if (pszdev_node) {
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 7ee8949..3d20454 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -394,11 +394,14 @@ static int __devexit omap34_xx_bridge_remove(struct platform_device *pdev)
 	dev_t devno;
 	bool ret;
 	int status = 0;
-	void *hdrv_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
-	status = cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT);
-	if (status)
+	/* Retrieve the Object handle from the driver data */
+	if (!drv_datap || !drv_datap->drv_object) {
+		status = -ENODATA;
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 		goto func_cont;
+	}
 
 #ifdef CONFIG_TIDSPBRIDGE_DVFS
 	if (cpufreq_unregister_notifier(&iva_clk_notifier,
diff --git a/drivers/staging/tidspbridge/rmgr/dspdrv.c b/drivers/staging/tidspbridge/rmgr/dspdrv.c
index 714f348..2ad291d 100644
--- a/drivers/staging/tidspbridge/rmgr/dspdrv.c
+++ b/drivers/staging/tidspbridge/rmgr/dspdrv.c
@@ -121,6 +121,7 @@ bool dsp_deinit(u32 device_context)
 	bool ret = true;
 	u32 device_node;
 	struct mgr_object *mgr_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	while ((device_node = drv_get_first_dev_extension()) != 0) {
 		(void)dev_remove_device((struct cfg_devnode *)device_node);
@@ -131,10 +132,14 @@ bool dsp_deinit(u32 device_context)
 
 	(void)drv_destroy((struct drv_object *)device_context);
 
-	/* Get the Manager Object from Registry
+	/* Get the Manager Object from driver data
 	 * MGR Destroy will unload the DCD dll */
-	if (!cfg_get_object((u32 *) &mgr_obj, REG_MGR_OBJECT))
+	if (drv_datap && drv_datap->mgr_object) {
+		mgr_obj = drv_datap->mgr_object;
 		(void)mgr_destroy(mgr_obj);
+	} else {
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
+	}
 
 	api_exit();
 
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index 57a39b9..c6131c4 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -123,6 +123,7 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,
 	u32 node_index = 0;
 	struct dcd_genericobj gen_obj;
 	struct mgr_object *pmgr_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(pndb_props != NULL);
 	DBC_REQUIRE(pu_num_nodes != NULL);
@@ -130,10 +131,14 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,
 	DBC_REQUIRE(refs > 0);
 
 	*pu_num_nodes = 0;
-	/* Get The Manager Object from the Registry */
-	status = cfg_get_object((u32 *) &pmgr_obj, REG_MGR_OBJECT);
-	if (status)
+	/* Get the Manager Object from the driver data */
+	if (!drv_datap || !drv_datap->mgr_object) {
+		status = -ENODATA;
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 		goto func_cont;
+	} else {
+		pmgr_obj = drv_datap->mgr_object;
+	}
 
 	DBC_ASSERT(pmgr_obj);
 	/* Forever loop till we hit failed or no more items in the
@@ -195,6 +200,7 @@ int mgr_enum_processor_info(u32 processor_id,
 	struct drv_object *hdrv_obj;
 	u8 dev_type;
 	struct cfg_devnode *dev_node;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 	bool proc_detect = false;
 
 	DBC_REQUIRE(processor_info != NULL);
@@ -203,7 +209,15 @@ int mgr_enum_processor_info(u32 processor_id,
 	DBC_REQUIRE(refs > 0);
 
 	*pu_num_procs = 0;
-	status = cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT);
+
+	/* Retrieve the Object handle from the driver data */
+	if (!drv_datap || !drv_datap->drv_object) {
+		status = -ENODATA;
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
+	} else {
+		hdrv_obj = drv_datap->drv_object;
+	}
+
 	if (!status) {
 		status = drv_get_dev_object(processor_id, hdrv_obj, &hdev_obj);
 		if (!status) {
@@ -219,8 +233,10 @@ int mgr_enum_processor_info(u32 processor_id,
 	if (status)
 		goto func_end;
 
-	/* Get The Manager Object from the Registry */
-	if (cfg_get_object((u32 *) &pmgr_obj, REG_MGR_OBJECT)) {
+	/* Get The Manager Object from the driver data */
+	if (drv_datap && drv_datap->mgr_object) {
+		pmgr_obj = drv_datap->mgr_object;
+	} else {
 		dev_dbg(bridge, "%s: Failed to get MGR Object\n", __func__);
 		goto func_end;
 	}
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 0a7e30b..295845b 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -280,6 +280,7 @@ proc_attach(u32 processor_id,
 	struct proc_object *p_proc_object = NULL;
 	struct mgr_object *hmgr_obj = NULL;
 	struct drv_object *hdrv_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 	u8 dev_type;
 
 	DBC_REQUIRE(refs > 0);
@@ -291,9 +292,13 @@ proc_attach(u32 processor_id,
 	}
 
 	/* Get the Driver and Manager Object Handles */
-	status = cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT);
-	if (!status)
-		status = cfg_get_object((u32 *) &hmgr_obj, REG_MGR_OBJECT);
+	if (!drv_datap || !drv_datap->drv_object || !drv_datap->mgr_object) {
+		status = -ENODATA;
+		pr_err("%s: Failed to get object handles\n", __func__);
+	} else {
+		hdrv_obj = drv_datap->drv_object;
+		hmgr_obj = drv_datap->mgr_object;
+	}
 
 	if (!status) {
 		/* Get the Device Object */
@@ -440,6 +445,7 @@ int proc_auto_start(struct cfg_devnode *dev_node_obj,
 	char sz_exec_file[MAXCMDLINELEN];
 	char *argv[2];
 	struct mgr_object *hmgr_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 	u8 dev_type;
 
 	DBC_REQUIRE(refs > 0);
@@ -447,9 +453,13 @@ int proc_auto_start(struct cfg_devnode *dev_node_obj,
 	DBC_REQUIRE(hdev_obj != NULL);
 
 	/* Create a Dummy PROC Object */
-	status = cfg_get_object((u32 *) &hmgr_obj, REG_MGR_OBJECT);
-	if (status)
+	if (!drv_datap || !drv_datap->mgr_object) {
+		status = -ENODATA;
+		pr_err("%s: Failed to retrieve the object handle\n", __func__);
 		goto func_end;
+	} else {
+		hmgr_obj = drv_datap->mgr_object;
+	}
 
 	p_proc_object = kzalloc(sizeof(struct proc_object), GFP_KERNEL);
 	if (p_proc_object == NULL) {
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 302eadd..94d8ebe 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -31,50 +31,6 @@
 #include <dspbridge/drv.h>
 
 /*
- *  ======== cfg_get_object ========
- *  Purpose:
- *      Retrieve the Object handle from the Registry
- */
-int cfg_get_object(u32 *value, u8 dw_type)
-{
-	int status = -EINVAL;
-	struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
-	DBC_REQUIRE(value != NULL);
-
-	if (!drv_datap)
-		return -EPERM;
-
-	switch (dw_type) {
-	case (REG_DRV_OBJECT):
-		if (drv_datap->drv_object) {
-			*value = (u32)drv_datap->drv_object;
-			status = 0;
-		} else {
-			status = -ENODATA;
-		}
-		break;
-	case (REG_MGR_OBJECT):
-		if (drv_datap->mgr_object) {
-			*value = (u32)drv_datap->mgr_object;
-			status = 0;
-		} else {
-			status = -ENODATA;
-		}
-		break;
-
-	default:
-		break;
-	}
-	if (status) {
-		*value = 0;
-		pr_err("%s: Failed, status 0x%x\n", __func__, status);
-	}
-	DBC_ENSURE((!status && *value != 0) || (status && *value == 0));
-	return status;
-}
-
-/*
  *  ======== cfg_set_dev_object ========
  *  Purpose:
  *      Store the Device Object handle and dev_node pointer for a given devnode.
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 08/11] staging: tidspbridge: Remove cfg_set_dev_object()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (6 preceding siblings ...)
  2010-08-25 22:09 ` [PATCH 07/11] staging: tidspbridge: Remove cfg_get_object() Ivan Gomez Castellanos
@ 2010-08-25 22:09 ` Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 09/11] staging: tidspbridge: Remove cfg_set_object() Ivan Gomez Castellanos
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, the cfg_set_dev_object
function has also to be removed.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   19 ------------
 drivers/staging/tidspbridge/pmgr/dev.c             |   28 ++++++++++--------
 drivers/staging/tidspbridge/services/cfg.c         |   30 --------------------
 3 files changed, 16 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 834b25b..e1ae1bc 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -79,25 +79,6 @@ 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:
  *      Store the Driver Object handle.
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 8077bdc..b0bcbd9 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -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);
 
@@ -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;
 }
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 94d8ebe..5517201 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -31,36 +31,6 @@
 #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:
  *      Store the Driver Object handle
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 09/11] staging: tidspbridge: Remove cfg_set_object()
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (7 preceding siblings ...)
  2010-08-25 22:09 ` [PATCH 08/11] staging: tidspbridge: Remove cfg_set_dev_object() Ivan Gomez Castellanos
@ 2010-08-25 22:09 ` Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 10/11] staging: tidspbridge: Remove cfg.c and cfg.h files Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 11/11] staging: tidspbridge: Remove services.c and services.h Ivan Gomez Castellanos
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

As the services directory is going to be removed, the cfg_set_object
function has also to be removed.

Since the driver object handle is retrieved from the drv_data structure,
then the word "Registry" is replaced by "driver data" in the comments.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   17 -----------
 drivers/staging/tidspbridge/rmgr/drv.c             |   24 +++++++++++++---
 drivers/staging/tidspbridge/rmgr/mgr.c             |   20 +++++++++++--
 drivers/staging/tidspbridge/services/cfg.c         |   29 --------------------
 4 files changed, 36 insertions(+), 54 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index e1ae1bc..238215b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -78,21 +78,4 @@ 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_SetDrvObject ========
- *  Purpose:
- *      Store the Driver Object handle.
- *  Parameters:
- *      value:          Arbitrary value to store.
- *      dw_type          Type of Object to Store
- *  Returns:
- *      0:        Success.
- *      -EPERM:      Internal Error.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:        The Private u32 was successfully set.
- */
-extern int cfg_set_object(u32 value, u8 dw_type);
-
 #endif /* CFG_ */
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index fc1f49b..519053f 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -309,6 +309,7 @@ int drv_create(struct drv_object **drv_obj)
 {
 	int status = 0;
 	struct drv_object *pdrv_object = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(drv_obj != NULL);
 	DBC_REQUIRE(refs > 0);
@@ -335,9 +336,16 @@ int drv_create(struct drv_object **drv_obj)
 	} else {
 		status = -ENOMEM;
 	}
-	/* Store the DRV Object in the Registry */
-	if (!status)
-		status = cfg_set_object((u32) pdrv_object, REG_DRV_OBJECT);
+	/* Store the DRV Object in the driver data */
+	if (!status) {
+		if (drv_datap) {
+			drv_datap->drv_object = (void *)pdrv_object;
+		} else {
+			status = -EPERM;
+			pr_err("%s: Failed to store DRV object\n", __func__);
+		}
+	}
+
 	if (!status) {
 		*drv_obj = pdrv_object;
 	} else {
@@ -374,6 +382,7 @@ int drv_destroy(struct drv_object *driver_obj)
 {
 	int status = 0;
 	struct drv_object *pdrv_object = (struct drv_object *)driver_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(refs > 0);
 	DBC_REQUIRE(pdrv_object);
@@ -386,8 +395,13 @@ int drv_destroy(struct drv_object *driver_obj)
 	kfree(pdrv_object->dev_list);
 	kfree(pdrv_object->dev_node_string);
 	kfree(pdrv_object);
-	/* Update the DRV Object in Registry to be 0 */
-	(void)cfg_set_object(0, REG_DRV_OBJECT);
+	/* Update the DRV Object in the driver data */
+	if (drv_datap) {
+		drv_datap->drv_object = NULL;
+	} else {
+		status = -EPERM;
+		pr_err("%s: Failed to store DRV object\n", __func__);
+	}
 
 	return status;
 }
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index c6131c4..48702bb 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -58,6 +58,7 @@ int mgr_create(struct mgr_object **mgr_obj,
 {
 	int status = 0;
 	struct mgr_object *pmgr_obj = NULL;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(mgr_obj != NULL);
 	DBC_REQUIRE(refs > 0);
@@ -67,7 +68,14 @@ int mgr_create(struct mgr_object **mgr_obj,
 		status = dcd_create_manager(ZLDLLNAME, &pmgr_obj->hdcd_mgr);
 		if (!status) {
 			/* If succeeded store the handle in the MGR Object */
-			status = cfg_set_object((u32) pmgr_obj, REG_MGR_OBJECT);
+			if (drv_datap) {
+				drv_datap->mgr_object = (void *)pmgr_obj;
+			} else {
+				status = -EPERM;
+				pr_err("%s: Failed to store MGR object\n",
+								__func__);
+			}
+
 			if (!status) {
 				*mgr_obj = pmgr_obj;
 			} else {
@@ -94,6 +102,7 @@ int mgr_destroy(struct mgr_object *hmgr_obj)
 {
 	int status = 0;
 	struct mgr_object *pmgr_obj = (struct mgr_object *)hmgr_obj;
+	struct drv_data *drv_datap = dev_get_drvdata(bridge);
 
 	DBC_REQUIRE(refs > 0);
 	DBC_REQUIRE(hmgr_obj);
@@ -103,8 +112,13 @@ int mgr_destroy(struct mgr_object *hmgr_obj)
 		dcd_destroy_manager(hmgr_obj->hdcd_mgr);
 
 	kfree(pmgr_obj);
-	/* Update the Registry with NULL for MGR Object */
-	(void)cfg_set_object(0, REG_MGR_OBJECT);
+	/* Update the driver data with NULL for MGR Object */
+	if (drv_datap) {
+		drv_datap->mgr_object = NULL;
+	} else {
+		status = -EPERM;
+		pr_err("%s: Failed to store MGR object\n", __func__);
+	}
 
 	return status;
 }
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 5517201..32bb934 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -30,32 +30,3 @@
 #include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 
-/*
- *  ======== cfg_set_object ========
- *  Purpose:
- *      Store the Driver Object handle
- */
-int cfg_set_object(u32 value, u8 dw_type)
-{
-	int status = -EINVAL;
-	struct drv_data *drv_datap = dev_get_drvdata(bridge);
-
-	if (!drv_datap)
-		return -EPERM;
-
-	switch (dw_type) {
-	case (REG_DRV_OBJECT):
-		drv_datap->drv_object = (void *)value;
-		status = 0;
-		break;
-	case (REG_MGR_OBJECT):
-		drv_datap->mgr_object = (void *)value;
-		status = 0;
-		break;
-	default:
-		break;
-	}
-	if (status)
-		pr_err("%s: Failed, status 0x%x\n", __func__, status);
-	return status;
-}
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 10/11] staging: tidspbridge: Remove cfg.c and cfg.h files
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (8 preceding siblings ...)
  2010-08-25 22:09 ` [PATCH 09/11] staging: tidspbridge: Remove cfg_set_object() Ivan Gomez Castellanos
@ 2010-08-25 22:09 ` Ivan Gomez Castellanos
  2010-08-25 22:09 ` [PATCH 11/11] staging: tidspbridge: Remove services.c and services.h Ivan Gomez Castellanos
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

So far, the cfg.c file is empty, and the function prototypes in cfg.h
are not used in any place. So they can be removed.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 drivers/staging/tidspbridge/Makefile               |    3 +-
 drivers/staging/tidspbridge/core/chnl_sm.c         |    1 -
 drivers/staging/tidspbridge/core/dsp-clock.c       |    1 -
 drivers/staging/tidspbridge/core/io_sm.c           |    1 -
 drivers/staging/tidspbridge/core/tiomap3430.c      |    1 -
 drivers/staging/tidspbridge/core/tiomap3430_pwr.c  |    4 +-
 drivers/staging/tidspbridge/core/tiomap_io.c       |    1 -
 .../staging/tidspbridge/include/dspbridge/cfg.h    |   81 --------------------
 drivers/staging/tidspbridge/pmgr/chnl.c            |    1 -
 drivers/staging/tidspbridge/pmgr/cmm.c             |    1 -
 drivers/staging/tidspbridge/pmgr/dev.c             |    1 -
 drivers/staging/tidspbridge/pmgr/dspapi.c          |    1 -
 drivers/staging/tidspbridge/pmgr/io.c              |    3 -
 drivers/staging/tidspbridge/rmgr/drv.c             |    1 -
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |    1 -
 drivers/staging/tidspbridge/rmgr/dspdrv.c          |    3 -
 drivers/staging/tidspbridge/rmgr/mgr.c             |    4 +-
 drivers/staging/tidspbridge/rmgr/node.c            |    1 -
 drivers/staging/tidspbridge/rmgr/proc.c            |    1 -
 drivers/staging/tidspbridge/rmgr/strm.c            |    1 -
 drivers/staging/tidspbridge/services/cfg.c         |   32 --------
 drivers/staging/tidspbridge/services/services.c    |    1 -
 22 files changed, 7 insertions(+), 138 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/cfg.h
 delete mode 100644 drivers/staging/tidspbridge/services/cfg.c

diff --git a/drivers/staging/tidspbridge/Makefile b/drivers/staging/tidspbridge/Makefile
index 8a13982..8f0ca88 100644
--- a/drivers/staging/tidspbridge/Makefile
+++ b/drivers/staging/tidspbridge/Makefile
@@ -1,8 +1,7 @@
 obj-$(CONFIG_TIDSPBRIDGE)	+= bridgedriver.o
 
 libgen = gen/gb.o gen/gs.o gen/gh.o gen/uuidutil.o
-libservices = services/cfg.o \
-		services/services.o
+libservices = services/services.o
 libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
 		core/tiomap3430_pwr.o core/tiomap_io.o \
 		core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index bee2b23..662a5b5 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -54,7 +54,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/sync.h>
 
 /*  ----------------------------------- Bridge Driver */
diff --git a/drivers/staging/tidspbridge/core/dsp-clock.c b/drivers/staging/tidspbridge/core/dsp-clock.c
index 5b1a0c5..46d17c7 100644
--- a/drivers/staging/tidspbridge/core/dsp-clock.c
+++ b/drivers/staging/tidspbridge/core/dsp-clock.c
@@ -25,7 +25,6 @@
 
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 #include <dspbridge/dev.h>
 #include "_tiomap.h"
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 02c660d..5718645 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -36,7 +36,6 @@
 #include <dspbridge/dbc.h>
 
 /* Services Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/ntfy.h>
 #include <dspbridge/sync.h>
 
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index f914829..f1e59e8 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -30,7 +30,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 #include <dspbridge/sync.h>
 
diff --git a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
index b789f8f..b9d0753 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
@@ -16,9 +16,11 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+/*  ----------------------------------- Host OS */
+#include <dspbridge/host_os.h>
+
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/cfg.h>
 #include <dspbridge/drv.h>
 #include <dspbridge/io_sm.h>
 
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 190c028..e78a7cd 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -27,7 +27,6 @@
 #include <dspbridge/drv.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/wdt.h>
 
 /*  ----------------------------------- specific to this file */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
deleted file mode 100644
index 238215b..0000000
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * cfg.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * PM Configuration module.
- *
- * Copyright (C) 2005-2006 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef CFG_
-#define CFG_
-#include <dspbridge/host_os.h>
-#include <dspbridge/cfgdefs.h>
-
-/*
- *  ======== cfg_get_cd_version ========
- *  Purpose:
- *      Retrieves the version of the PM Class Driver.
- *  Parameters:
- *      version:    Ptr to u32 to contain version number upon return.
- *  Returns:
- *      0:    Success.  version contains Class Driver version in
- *                  the form: 0xAABBCCDD where AABB is Major version and
- *                  CCDD is Minor.
- *      -EPERM:  Failure.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:    Success.
- *      else:       *version is NULL.
- */
-extern int cfg_get_cd_version(u32 *version);
-
-/*
- *  ======== cfg_get_perf_value ========
- *  Purpose:
- *      Retrieve a flag indicating whether PERF should log statistics for the
- *      PM class driver.
- *  Parameters:
- *      enable_perf:    Location to store flag.  0 indicates the key was
- *                      not found, or had a zero value.  A nonzero value
- *                      means the key was found and had a nonzero value.
- *  Returns:
- *  Requires:
- *      enable_perf != NULL;
- *  Ensures:
- */
-extern void cfg_get_perf_value(bool *enable_perf);
-
-/*
- *  ======== cfg_get_zl_file ========
- *  Purpose:
- *      Retreive the ZLFile, if any, for this board.
- *  Parameters:
- *      dev_node_obj: Handle to the dev_node who's driver we are querying.
- *      buf_size:       Size of buffer.
- *      str_zl_file_name: Ptr to character buf to hold ZLFileName.
- *  Returns:
- *      0:                Success.
- *      -EFAULT: str_zl_file_name is invalid or dev_node_obj is invalid.
- *      -ENODATA: couldn't find the ZLFileName.
- *  Requires:
- *      CFG initialized.
- *  Ensures:
- *      0:    Not more than buf_size bytes were copied into
- *                  str_zl_file_name, and *str_zl_file_name contains ZLFileName
- *                  for this devnode.
- */
-extern int cfg_get_zl_file(struct cfg_devnode *dev_node_obj,
-				  u32 buf_size, char *str_zl_file_name);
-
-#endif /* CFG_ */
diff --git a/drivers/staging/tidspbridge/pmgr/chnl.c b/drivers/staging/tidspbridge/pmgr/chnl.c
index 90317b5..78b0d0f 100644
--- a/drivers/staging/tidspbridge/pmgr/chnl.c
+++ b/drivers/staging/tidspbridge/pmgr/chnl.c
@@ -28,7 +28,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/sync.h>
 
 /*  ----------------------------------- Platform Manager */
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index ce3dc88..e3f77bd 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -38,7 +38,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/list.h>
 #include <dspbridge/sync.h>
 #include <dspbridge/utildefs.h>
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index b0bcbd9..132e960 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -27,7 +27,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/ldr.h>
 #include <dspbridge/list.h>
 
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index d9bb3ea..10a1444 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -28,7 +28,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/ntfy.h>
 #include <dspbridge/services.h>
 
diff --git a/drivers/staging/tidspbridge/pmgr/io.c b/drivers/staging/tidspbridge/pmgr/io.c
index 7970fe5..20cbb9f 100644
--- a/drivers/staging/tidspbridge/pmgr/io.c
+++ b/drivers/staging/tidspbridge/pmgr/io.c
@@ -26,9 +26,6 @@
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
 
-/*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
-
 /*  ----------------------------------- Platform Manager */
 #include <dspbridge/dev.h>
 
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 519053f..81b1b90 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -27,7 +27,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/list.h>
 
 /*  ----------------------------------- This */
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 3d20454..ae28b96 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -54,7 +54,6 @@
 /*  ----------------------------------- This */
 #include <drv_interface.h>
 
-#include <dspbridge/cfg.h>
 #include <dspbridge/resourcecleanup.h>
 #include <dspbridge/chnl.h>
 #include <dspbridge/proc.h>
diff --git a/drivers/staging/tidspbridge/rmgr/dspdrv.c b/drivers/staging/tidspbridge/rmgr/dspdrv.c
index 2ad291d..7a6fc73 100644
--- a/drivers/staging/tidspbridge/rmgr/dspdrv.c
+++ b/drivers/staging/tidspbridge/rmgr/dspdrv.c
@@ -26,9 +26,6 @@
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
 
-/*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
-
 /*  ----------------------------------- Platform Manager */
 #include <dspbridge/drv.h>
 #include <dspbridge/dev.h>
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index 48702bb..0ea89a1 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -20,6 +20,9 @@
 
 #include <linux/types.h>
 
+/*  ----------------------------------- Host OS */
+#include <dspbridge/host_os.h>
+
 /*  ----------------------------------- DSP/BIOS Bridge */
 #include <dspbridge/dbdefs.h>
 
@@ -27,7 +30,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/sync.h>
 
 /*  ----------------------------------- Others */
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 6e9441e..84882dc 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -27,7 +27,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/list.h>
 #include <dspbridge/memdefs.h>
 #include <dspbridge/proc.h>
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 295845b..b47d7aa 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -29,7 +29,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/list.h>
 #include <dspbridge/ntfy.h>
 #include <dspbridge/sync.h>
diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index ef2ec94..f4986b7 100644
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -42,7 +42,6 @@
 /*  ----------------------------------- This */
 #include <dspbridge/strm.h>
 
-#include <dspbridge/cfg.h>
 #include <dspbridge/resourcecleanup.h>
 
 /*  ----------------------------------- Defines, Data Structures, Typedefs */
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
deleted file mode 100644
index 32bb934..0000000
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * cfg.c
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Implementation of platform specific config services.
- *
- * Copyright (C) 2005-2006 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <linux/types.h>
-
-/*  ----------------------------------- DSP/BIOS Bridge */
-#include <dspbridge/dbdefs.h>
-
-/*  ----------------------------------- Trace & Debug */
-#include <dspbridge/dbc.h>
-
-/*  ----------------------------------- OS Adaptation Layer */
-
-/*  ----------------------------------- This */
-#include <dspbridge/cfg.h>
-#include <dspbridge/drv.h>
-
diff --git a/drivers/staging/tidspbridge/services/services.c b/drivers/staging/tidspbridge/services/services.c
index 47bac21..3d0497e 100644
--- a/drivers/staging/tidspbridge/services/services.c
+++ b/drivers/staging/tidspbridge/services/services.c
@@ -27,7 +27,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/cfg.h>
 #include <dspbridge/ntfy.h>
 #include <dspbridge/sync.h>
 #include <dspbridge/clk.h>
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 11/11] staging: tidspbridge: Remove services.c and services.h
  2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
                   ` (9 preceding siblings ...)
  2010-08-25 22:09 ` [PATCH 10/11] staging: tidspbridge: Remove cfg.c and cfg.h files Ivan Gomez Castellanos
@ 2010-08-25 22:09 ` Ivan Gomez Castellanos
  10 siblings, 0 replies; 12+ messages in thread
From: Ivan Gomez Castellanos @ 2010-08-25 22:09 UTC (permalink / raw)
  To: linux-kernel, linux-omap, gregkh
  Cc: Hiroshi.DOYU, ameya.palande, felipe.contreras, omar.ramirez,
	ohad, rene.sapiens, nm, ernesto, x0095078,
	Ivan Gomez Castellanos

The services_init() and services_exit() functions don't do anything,
so they are removed, and as these are the only two functions defined
in services.c and services.h, then these files are also removed.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
---
 drivers/staging/tidspbridge/Makefile               |    1 -
 .../tidspbridge/include/dspbridge/services.h       |   50 -----------------
 drivers/staging/tidspbridge/pmgr/dspapi.c          |    1 -
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |    4 --
 drivers/staging/tidspbridge/services/services.c    |   57 --------------------
 5 files changed, 0 insertions(+), 113 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/services.h
 delete mode 100644 drivers/staging/tidspbridge/services/services.c

diff --git a/drivers/staging/tidspbridge/Makefile b/drivers/staging/tidspbridge/Makefile
index 8f0ca88..8082d5c 100644
--- a/drivers/staging/tidspbridge/Makefile
+++ b/drivers/staging/tidspbridge/Makefile
@@ -1,7 +1,6 @@
 obj-$(CONFIG_TIDSPBRIDGE)	+= bridgedriver.o
 
 libgen = gen/gb.o gen/gs.o gen/gh.o gen/uuidutil.o
-libservices = services/services.o
 libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
 		core/tiomap3430_pwr.o core/tiomap_io.o \
 		core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o
diff --git a/drivers/staging/tidspbridge/include/dspbridge/services.h b/drivers/staging/tidspbridge/include/dspbridge/services.h
deleted file mode 100644
index eb26c86..0000000
--- a/drivers/staging/tidspbridge/include/dspbridge/services.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * services.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Provide loading and unloading of SERVICES modules.
- *
- * Copyright (C) 2005-2006 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef SERVICES_
-#define SERVICES_
-
-#include <dspbridge/host_os.h>
-/*
- *  ======== services_exit ========
- *  Purpose:
- *      Discontinue usage of module; free resources when reference count
- *      reaches 0.
- *  Parameters:
- *  Returns:
- *  Requires:
- *      SERVICES initialized.
- *  Ensures:
- *      Resources used by module are freed when cRef reaches zero.
- */
-extern void services_exit(void);
-
-/*
- *  ======== services_init ========
- *  Purpose:
- *      Initializes SERVICES modules.
- *  Parameters:
- *  Returns:
- *      TRUE if all modules initialized; otherwise FALSE.
- *  Requires:
- *  Ensures:
- *      SERVICES modules initialized.
- */
-extern bool services_init(void);
-
-#endif /* SERVICES_ */
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 10a1444..b23591b 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -29,7 +29,6 @@
 
 /*  ----------------------------------- OS Adaptation Layer */
 #include <dspbridge/ntfy.h>
-#include <dspbridge/services.h>
 
 /*  ----------------------------------- Platform Manager */
 #include <dspbridge/chnl.h>
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index ae28b96..4c0b9ee 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -39,7 +39,6 @@
 #include <dspbridge/dbc.h>
 
 /*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/services.h>
 #include <dspbridge/clk.h>
 #include <dspbridge/sync.h>
 
@@ -270,7 +269,6 @@ static int omap3_bridge_startup(struct platform_device *pdev)
 #endif
 
 	dsp_clk_init();
-	services_init();
 
 	drv_datap = kzalloc(sizeof(struct drv_data), GFP_KERNEL);
 	if (!drv_datap) {
@@ -327,7 +325,6 @@ err1:
 					CPUFREQ_TRANSITION_NOTIFIER);
 #endif
 	dsp_clk_exit();
-	services_exit();
 
 	return err;
 }
@@ -420,7 +417,6 @@ func_cont:
 	mem_ext_phys_pool_release();
 
 	dsp_clk_exit();
-	services_exit();
 
 	devno = MKDEV(driver_major, 0);
 	cdev_del(&bridge_cdev);
diff --git a/drivers/staging/tidspbridge/services/services.c b/drivers/staging/tidspbridge/services/services.c
deleted file mode 100644
index 3d0497e..0000000
--- a/drivers/staging/tidspbridge/services/services.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * services.c
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Provide SERVICES loading.
- *
- * Copyright (C) 2005-2006 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <linux/types.h>
-
-#include <dspbridge/host_os.h>
-
-/*  ----------------------------------- DSP/BIOS Bridge */
-#include <dspbridge/dbdefs.h>
-
-/*  ----------------------------------- Trace & Debug */
-#include <dspbridge/dbc.h>
-
-/*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/ntfy.h>
-#include <dspbridge/sync.h>
-#include <dspbridge/clk.h>
-
-/*  ----------------------------------- This */
-#include <dspbridge/services.h>
-
-/*
- *  ======== services_exit ========
- *  Purpose:
- *      Discontinue usage of module; free resources when reference count
- *      reaches 0.
- */
-void services_exit(void)
-{
-}
-
-/*
- *  ======== services_init ========
- *  Purpose:
- *      Initializes SERVICES modules.
- */
-bool services_init(void)
-{
-	bool ret = true;
-
-	return ret;
-}
-- 
1.7.0.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-08-25 22:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-25 22:08 [PATCH 00/11] staging: tidspbridge: Remove services directory Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 01/11] staging: tidspbridge: Move sync.c from services to core Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 02/11] staging: tidspbridge: Remove ntfy.c Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 03/11] staging: tidspbridge: Remove cfg_get_auto_start() Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 04/11] staging: tidspbridge: Remove cfg_init() and cfg_exit() Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 05/11] staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup Ivan Gomez Castellanos
2010-08-25 22:08 ` [PATCH 06/11] staging: tidspbridge: Remove cfg_get_exec_file() Ivan Gomez Castellanos
2010-08-25 22:09 ` [PATCH 07/11] staging: tidspbridge: Remove cfg_get_object() Ivan Gomez Castellanos
2010-08-25 22:09 ` [PATCH 08/11] staging: tidspbridge: Remove cfg_set_dev_object() Ivan Gomez Castellanos
2010-08-25 22:09 ` [PATCH 09/11] staging: tidspbridge: Remove cfg_set_object() Ivan Gomez Castellanos
2010-08-25 22:09 ` [PATCH 10/11] staging: tidspbridge: Remove cfg.c and cfg.h files Ivan Gomez Castellanos
2010-08-25 22:09 ` [PATCH 11/11] staging: tidspbridge: Remove services.c and services.h Ivan Gomez Castellanos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®