# Re: \[PATCH\] cyber2000fb: New framebuffer\_alloc API and class\_dev changes

- From: Russell King \<hidden\>
- Date: 2003-09-16 15:29:29 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2003/09/13451844
- Thread: https://ratatoskr.run/linux-fbdev/2003/09/13451844/t.md

```text
On Tue, Sep 16, 2003 at 05:17:01PM +0200, Kronos wrote:
> Il Tue, Sep 16, 2003 at 03:52:30PM +0100, Russell King ha scritto: 
> > - framebuffer_alloc() creates the fb_info and the driver-private data
> >   in one object, as per your patch.
> 
> > - framebuffer_free() marks the structure available for freeing.
> 
> 
> So framebuffer_alloc calls class_device_get and framebuffer_free calls
> class_device_put. Ok, I'll rework the patch.

You could call class_device_del() instead of class_device_unregister()
from unregister_framebuffer(), and call class_device_put() in
framebuffer_free().

-- 
Russell King (rmk@arm.linux.org.uk)	http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/
  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
  2.6 Serial core


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
```
