dsoastro / framebuffer_driver_rpi

The code of linux kernel framebuffer driver for raspberry pi and LCD screen with detailed description
14 stars 1 forks source link

[Question] Release memory in remove function #2

Open vanhao-hub opened 1 year ago

vanhao-hub commented 1 year ago

Dear @dsoastro , I see call dev_set_drvdata(&dev->dev, item); in probe function, item is type of pointer struc ili9341. But in remove function, i see you call struct fb_info *info = platform_get_drvdata(device); reuturn value is porint struct fb_infor. Could you help me to make clear this point Thank you.

vanhao-hub commented 1 year ago

I think we should use these code change in remove driver function struct ili9341 item = dev_get_drvdata(&device->dev); struct fb_info info = item->info; instead of: struct fb_info info = platform_get_drvdata(device); struct ili9341 item = (struct ili9341 *)info->par;