* [PATCH 1/2] i2c: i2c-omap: fix build break with CONFIG_SUSPEND=n
@ 2011-02-22 6:51 Anand Gadiyar
[not found] ` <1298357487-10966-1-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Anand Gadiyar @ 2011-02-22 6:51 UTC (permalink / raw)
To: linux-i2c, linux-next; +Cc: Sourav Poddar, Anand Gadiyar, Ben Dooks
From: Sourav Poddar <sourav.poddar@ti.com>
When CONFIG_SUSPEND=n, we get the following build break when
building for OMAP targets. Fix this.
CC drivers/i2c/busses/i2c-omap.o
drivers/i2c/busses/i2c-omap.c:1173: error: lvalue required as unary '&' operand
make[1]: *** [drivers/i2c/busses/i2c-omap.o] Error 1
make: *** [drivers/i2c/busses/] Error 2
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
--
This is a fix for a trivial build error, seen with linux-next
as of 20110217.
drivers/i2c/busses/i2c-omap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-omap-usb/drivers/i2c/busses/i2c-omap.c
===================================================================
--- linux-omap-usb.orig/drivers/i2c/busses/i2c-omap.c
+++ linux-omap-usb/drivers/i2c/busses/i2c-omap.c
@@ -1156,10 +1156,11 @@ static int omap_i2c_resume(struct device
return 0;
}
-static struct dev_pm_ops omap_i2c_pm_ops = {
+static struct dev_pm_ops omap_i2c_pm = {
.suspend = omap_i2c_suspend,
.resume = omap_i2c_resume,
};
+#define omap_i2c_pm_ops (&omap_i2c_pm)
#else
#define omap_i2c_pm_ops NULL
#endif
@@ -1170,7 +1171,7 @@ static struct platform_driver omap_i2c_d
.driver = {
.name = "omap_i2c",
.owner = THIS_MODULE,
- .pm = &omap_i2c_pm_ops,
+ .pm = omap_i2c_pm_ops,
},
};
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] i2c: i2c-omap: make dev_pm_ops a const struct
[not found] ` <1298357487-10966-1-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
@ 2011-02-22 6:51 ` Anand Gadiyar
0 siblings, 0 replies; 2+ messages in thread
From: Anand Gadiyar @ 2011-02-22 6:51 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-next-u79uwXL29TY76Z2rM5mHXA
Cc: Anand Gadiyar, Ben Dooks
dev_pm_ops is normally a const struct. Update the structure
in this driver accordingly.
Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
---
Checkpatch complained about this when I generated the previous patch.
So I thought I might as well fix it up.
drivers/i2c/busses/i2c-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-omap-usb/drivers/i2c/busses/i2c-omap.c
===================================================================
--- linux-omap-usb.orig/drivers/i2c/busses/i2c-omap.c
+++ linux-omap-usb/drivers/i2c/busses/i2c-omap.c
@@ -1156,7 +1156,7 @@ static int omap_i2c_resume(struct device
return 0;
}
-static struct dev_pm_ops omap_i2c_pm = {
+static const struct dev_pm_ops omap_i2c_pm = {
.suspend = omap_i2c_suspend,
.resume = omap_i2c_resume,
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-22 6:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 6:51 [PATCH 1/2] i2c: i2c-omap: fix build break with CONFIG_SUSPEND=n Anand Gadiyar
[not found] ` <1298357487-10966-1-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2011-02-22 6:51 ` [PATCH 2/2] i2c: i2c-omap: make dev_pm_ops a const struct Anand Gadiyar
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).