提交 f5daff3f 编写于 作者: S Sudip Mukherjee 提交者: Greg Kroah-Hartman

staging: sm7xxfb: fix alignment

Fix the alignment.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3e4b5598
...@@ -302,8 +302,8 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -302,8 +302,8 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
} }
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t static ssize_t smtcfb_read(struct fb_info *info, char __user *buf,
count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
unsigned long p = *ppos; unsigned long p = *ppos;
...@@ -346,8 +346,7 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t ...@@ -346,8 +346,7 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t
dst = buffer; dst = buffer;
for (i = c >> 2; i--;) { for (i = c >> 2; i--;) {
*dst = fb_readl(src++); *dst = fb_readl(src++);
*dst = *dst = (*dst & 0xff00ff00 >> 8) |
(*dst & 0xff00ff00 >> 8) |
(*dst & 0x00ff00ff << 8); (*dst & 0x00ff00ff << 8);
dst++; dst++;
} }
...@@ -381,9 +380,8 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t ...@@ -381,9 +380,8 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t
return (err) ? err : cnt; return (err) ? err : cnt;
} }
static ssize_t static ssize_t smtcfb_write(struct fb_info *info, const char __user *buf,
smtcfb_write(struct fb_info *info, const char __user *buf, size_t count, size_t count, loff_t *ppos)
loff_t *ppos)
{ {
unsigned long p = *ppos; unsigned long p = *ppos;
...@@ -552,8 +550,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb) ...@@ -552,8 +550,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
writel(0x0, sfb->vp_regs + 0x40); writel(0x0, sfb->vp_regs + 0x40);
/* set data width */ /* set data width */
m_nscreenstride = m_nscreenstride = (sfb->width * sfb->fb->var.bits_per_pixel) / 64;
(sfb->width * sfb->fb->var.bits_per_pixel) / 64;
switch (sfb->fb->var.bits_per_pixel) { switch (sfb->fb->var.bits_per_pixel) {
case 8: case 8:
writel(0x0, sfb->vp_regs + 0x0); writel(0x0, sfb->vp_regs + 0x0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册