Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151171
b: refs/heads/master
c: 3f06cd2
h: refs/heads/master
i:
  151169: e1dff15
  151167: 4fe9271
v: v3
  • Loading branch information
Krzysztof Helt authored and David S. Miller committed Jun 16, 2009
1 parent 00a608f commit f0937c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 280ff97494e0fef4124bee5c52e39b23a18dd283
refs/heads/master: 3f06cd29358dd390d62afcde14fde54cec9deef9
20 changes: 8 additions & 12 deletions trunk/drivers/video/bw2.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ struct bw2_par {
u32 flags;
#define BW2_FLAG_BLANKED 0x00000001

unsigned long physbase;
unsigned long which_io;
unsigned long fbsize;
};

/**
Expand Down Expand Up @@ -167,17 +165,15 @@ static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma)
struct bw2_par *par = (struct bw2_par *)info->par;

return sbusfb_mmap_helper(bw2_mmap_map,
par->physbase, par->fbsize,
info->fix.smem_start, info->fix.smem_len,
par->which_io,
vma);
}

static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct bw2_par *par = (struct bw2_par *) info->par;

return sbusfb_ioctl_helper(cmd, arg, info,
FBTYPE_SUN2BW, 1, par->fbsize);
FBTYPE_SUN2BW, 1, info->fix.smem_len);
}

/*
Expand Down Expand Up @@ -294,7 +290,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *

spin_lock_init(&par->lock);

par->physbase = op->resource[0].start;
info->fix.smem_start = op->resource[0].start;
par->which_io = op->resource[0].flags & IORESOURCE_BITS;

sbusfb_fill_var(&info->var, dp, 1);
Expand All @@ -317,13 +313,13 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
goto out_unmap_regs;
}

par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);

info->flags = FBINFO_DEFAULT;
info->fbops = &bw2_ops;

info->screen_base = of_ioremap(&op->resource[0], 0,
par->fbsize, "bw2 ram");
info->fix.smem_len, "bw2 ram");
if (!info->screen_base)
goto out_unmap_regs;

Expand All @@ -338,12 +334,12 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
dev_set_drvdata(&op->dev, info);

printk(KERN_INFO "%s: bwtwo at %lx:%lx\n",
dp->full_name, par->which_io, par->physbase);
dp->full_name, par->which_io, info->fix.smem_start);

return 0;

out_unmap_screen:
of_iounmap(&op->resource[0], info->screen_base, par->fbsize);
of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);

out_unmap_regs:
of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs));
Expand All @@ -363,7 +359,7 @@ static int __devexit bw2_remove(struct of_device *op)
unregister_framebuffer(info);

of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs));
of_iounmap(&op->resource[0], info->screen_base, par->fbsize);
of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);

framebuffer_release(info);

Expand Down

0 comments on commit f0937c2

Please sign in to comment.