From: "Víctor Manuel Jáquez Leal" <vjaquez@igalia.com>
To: Omar Ramirez Luna <omar.ramirez@ti.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Armando Uribe <x0095078@ti.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
linux-omap@vger.kernel.org,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 1/5] staging: tidspbridge: more readable code
Date: Mon, 23 Jan 2012 22:09:44 +0200 [thread overview]
Message-ID: <42f005f230f96409857bd96f38b234a4da01f421.1327348286.git.vjaquez@igalia.com> (raw)
In-Reply-To: <cover.1327348286.git.vjaquez@igalia.com>
In-Reply-To: <cover.1327348286.git.vjaquez@igalia.com>
Uppercase function names are not pretty. Also the code flow readability is
enhanced.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
---
drivers/staging/tidspbridge/rmgr/drv_interface.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 76cfc6e..85f6e8e 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -428,7 +428,7 @@ func_cont:
}
#ifdef CONFIG_PM
-static int BRIDGE_SUSPEND(struct platform_device *pdev, pm_message_t state)
+static int bridge_suspend(struct platform_device *pdev, pm_message_t state)
{
u32 status;
u32 command = PWR_EMERGENCYDEEPSLEEP;
@@ -441,7 +441,7 @@ static int BRIDGE_SUSPEND(struct platform_device *pdev, pm_message_t state)
return 0;
}
-static int BRIDGE_RESUME(struct platform_device *pdev)
+static int bridge_resume(struct platform_device *pdev)
{
u32 status;
@@ -453,9 +453,6 @@ static int BRIDGE_RESUME(struct platform_device *pdev)
wake_up(&bridge_suspend_data.suspend_wq);
return 0;
}
-#else
-#define BRIDGE_SUSPEND NULL
-#define BRIDGE_RESUME NULL
#endif
static struct platform_driver bridge_driver = {
@@ -464,8 +461,10 @@ static struct platform_driver bridge_driver = {
},
.probe = omap34_xx_bridge_probe,
.remove = __devexit_p(omap34_xx_bridge_remove),
- .suspend = BRIDGE_SUSPEND,
- .resume = BRIDGE_RESUME,
+#ifdef CONFIG_PM
+ .suspend = bridge_suspend,
+ .resume = bridge_resume,
+#endif
};
static int __init bridge_init(void)
--
1.7.8.3
next prev parent reply other threads:[~2012-01-23 20:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 20:09 [PATCH 0/5] staging: tidspbridge: clean up drv_interface.c Víctor Manuel Jáquez Leal
2012-01-23 20:09 ` Víctor Manuel Jáquez Leal [this message]
2012-01-24 18:22 ` [PATCH 1/5] staging: tidspbridge: more readable code Felipe Contreras
2012-01-30 17:14 ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 2/5] staging: tidspbridge: remove unused header Víctor Manuel Jáquez Leal
2012-01-24 17:45 ` Felipe Contreras
2012-01-30 17:15 ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c Víctor Manuel Jáquez Leal
2012-01-30 17:25 ` Ramirez Luna, Omar
2012-01-30 17:59 ` Víctor M. Jáquez L.
2012-01-30 19:29 ` Dan Carpenter
2012-01-30 19:53 ` Joe Perches
2012-01-30 20:33 ` Víctor M. Jáquez L.
2012-01-30 20:40 ` Joe Perches
2012-01-23 20:09 ` [PATCH 4/5] staging: tidspbridge: silence the compiler Víctor Manuel Jáquez Leal
2012-01-30 17:28 ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 5/5] staging: tidspbridge: remove header inclusions Víctor Manuel Jáquez Leal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42f005f230f96409857bd96f38b234a4da01f421.1327348286.git.vjaquez@igalia.com \
--to=vjaquez@igalia.com \
--cc=devel@driverdev.osuosl.org \
--cc=felipe.contreras@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=omar.ramirez@ti.com \
--cc=x0095078@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).