diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-05-22 12:35:39 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-04-27 15:01:45 -0400 |
commit | 277d32a36cba0b42c9c6836ff07f9b978566e95c (patch) | |
tree | 7161c2ddeb6064a42ba4babe3678a0493ecf6365 /drivers/video/via/viafbdev.c | |
parent | c205d932530719d2a6ddb9152650e5bbe80c9400 (diff) |
viafb: rework the I2C support in the VIA framebuffer driver
This patch changes the way how the various I2C busses are used internally
inside the viafb driver: Previosuly, only a single i2c_adapter was created,
even though two different hardware I2C busses are accessed: A structure member
in a global variable was modified to indicate the bus to be used.
Now, all existing hardware busses are registered with the i2c core, and the
viafb_i2c_{read,write}byte[s]() function take the adapter number as function
call parameter, rather than referring to the global structure member.
[jc: even more painful merge with mainline changes ->2.6.34]
[jc: painful merge with OLPC changes]
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/viafbdev.c')
-rw-r--r-- | drivers/video/via/viafbdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 8955ab4caac8..fa1004997c63 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -1775,7 +1775,7 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, | |||
1775 | viafb_dual_fb = 0; | 1775 | viafb_dual_fb = 0; |
1776 | 1776 | ||
1777 | /* Set up I2C bus stuff */ | 1777 | /* Set up I2C bus stuff */ |
1778 | rc = viafb_create_i2c_bus(viaparinfo); | 1778 | rc = viafb_create_i2c_busses(viaparinfo); |
1779 | if (rc) | 1779 | if (rc) |
1780 | goto out_fb_release; | 1780 | goto out_fb_release; |
1781 | 1781 | ||
@@ -1964,7 +1964,7 @@ out_fb1_release: | |||
1964 | out_unmap_screen: | 1964 | out_unmap_screen: |
1965 | iounmap(viafbinfo->screen_base); | 1965 | iounmap(viafbinfo->screen_base); |
1966 | out_delete_i2c: | 1966 | out_delete_i2c: |
1967 | viafb_delete_i2c_buss(viaparinfo); | 1967 | viafb_delete_i2c_busses(viaparinfo); |
1968 | out_fb_release: | 1968 | out_fb_release: |
1969 | framebuffer_release(viafbinfo); | 1969 | framebuffer_release(viafbinfo); |
1970 | return rc; | 1970 | return rc; |
@@ -1980,7 +1980,7 @@ static void __devexit via_pci_remove(struct pci_dev *pdev) | |||
1980 | iounmap((void *)viafbinfo->screen_base); | 1980 | iounmap((void *)viafbinfo->screen_base); |
1981 | iounmap(viaparinfo->shared->engine_mmio); | 1981 | iounmap(viaparinfo->shared->engine_mmio); |
1982 | 1982 | ||
1983 | viafb_delete_i2c_buss(viaparinfo); | 1983 | viafb_delete_i2c_busses(viaparinfo); |
1984 | 1984 | ||
1985 | framebuffer_release(viafbinfo); | 1985 | framebuffer_release(viafbinfo); |
1986 | if (viafb_dual_fb) | 1986 | if (viafb_dual_fb) |