From: dmunsie@cecropia.com (Dennis Munsie)
To: linux-fbdev-devel@lists.sourceforge.net
Cc: ehustvedt@cecropia.com, airlied@skynet.ie
Subject: [PATCH 2.6.17-rc6-mm2 8/8] intelfb: RESEND - add preliminary i2c support
Date: Tue, 20 Jun 2006 14:55:55 -0400 (EDT) [thread overview]
Message-ID: <20060620185555.392BB90CFB8@xenon> (raw)
From: Dennis Munsie <dmunsie@cecropia.com>
Adds code to unregister the I2C buses in the cleanup function.
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
---
drivers/video/intelfb/intelfb.h | 1 +
drivers/video/intelfb/intelfb_i2c.c | 16 ++++++++++++++++
drivers/video/intelfb/intelfbdrv.c | 5 +++++
3 files changed, 22 insertions(+)
diff -Naurp -X linux-2.6.17-rc6-patched/Documentation/dontdiff linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfb.h linux/drivers/video/intelfb/intelfb.h
--- linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfb.h 2006-06-14 15:27:30.000000000 -0500
+++ linux/drivers/video/intelfb/intelfb.h 2006-06-16 08:38:25.000000000 -0500
@@ -367,6 +367,7 @@ extern int intelfb_var_to_depth(const st
#ifdef CONFIG_FB_INTEL_I2C
extern void intelfb_create_i2c_busses(struct intelfb_info *dinfo);
+extern void intelfb_delete_i2c_busses(struct intelfb_info *dinfo);
#endif
#endif /* _INTELFB_H */
diff -Naurp -X linux-2.6.17-rc6-patched/Documentation/dontdiff linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfb_i2c.c linux/drivers/video/intelfb/intelfb_i2c.c
--- linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfb_i2c.c 2006-06-14 15:27:30.000000000 -0500
+++ linux/drivers/video/intelfb/intelfb_i2c.c 2006-06-16 08:36:58.000000000 -0500
@@ -182,3 +182,19 @@ void intelfb_create_i2c_busses(struct in
}
dinfo->num_outputs = i;
}
+
+void intelfb_delete_i2c_busses(struct intelfb_info *dinfo)
+{
+ int i;
+
+ for (i = 0; i < MAX_OUTPUTS; i++) {
+ if (dinfo->output[i].i2c_bus.dinfo) {
+ i2c_bit_del_bus(&dinfo->output[i].i2c_bus.adapter);
+ dinfo->output[i].i2c_bus.dinfo = NULL;
+ }
+ if (dinfo->output[i].ddc_bus.dinfo) {
+ i2c_bit_del_bus(&dinfo->output[i].ddc_bus.adapter);
+ dinfo->output[i].ddc_bus.dinfo = NULL;
+ }
+ }
+}
diff -Naurp -X linux-2.6.17-rc6-patched/Documentation/dontdiff linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfbdrv.c linux/drivers/video/intelfb/intelfbdrv.c
--- linux-2.6.17-rc6-patched/drivers/video/intelfb/intelfbdrv.c 2006-06-14 15:27:30.000000000 -0500
+++ linux/drivers/video/intelfb/intelfbdrv.c 2006-06-16 08:47:31.000000000 -0500
@@ -474,6 +474,11 @@ cleanup(struct intelfb_info *dinfo)
agp_free_memory(dinfo->gtt_ring_mem);
}
+#ifdef CONFIG_FB_INTEL_I2C
+ /* un-register I2C bus */
+ intelfb_delete_i2c_busses(dinfo);
+#endif
+
if (dinfo->mmio_base)
iounmap((void __iomem *)dinfo->mmio_base);
if (dinfo->aperture.virtual)
reply other threads:[~2006-06-20 18:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060620185555.392BB90CFB8@xenon \
--to=dmunsie@cecropia.com \
--cc=airlied@skynet.ie \
--cc=ehustvedt@cecropia.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).