Hi, I need to use the struct gendisk, to get the disk capacity "via" struct request_queue. I know
disk = container_of(queue->kobj.parent, struct gendisk, kobj);
with the old kernel, but with 2.6.26?
@param request_queue q
struct device *dev = container_of(q->kobj.parent, struct device, kobj); struct *disk = container_of(dev, struct gendisk, dev);
I finally realized
@param request_queue q
struct device *dev = container_of(q->kobj.parent, struct device, kobj);
struct *disk = container_of(dev, struct gendisk, dev);