From: Bartlomiej Zolnierkiewicz Date: Wed, 25 Feb 2009 19:28:24 +0000 (+0100) Subject: ide: fix refcounting in device drivers X-Git-Tag: v2.6.29-rc7~54^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fed43684174b68f04d01d1210fd00536af790df;p=pandora-kernel.git ide: fix refcounting in device drivers During host driver module removal del_gendisk() results in a final put on drive->gendev and freeing the drive by drive_release_dev(). Convert device drivers from using struct kref to use struct device so device driver's object holds reference on ->gendev and prevents drive from prematurely going away. Also fix ->remove methods to not erroneously drop reference on a host driver by using only put_device() instead of ide*_put(). Reported-by: Stanislaw Gruszka Tested-by: Stanislaw Gruszka Signed-off-by: Bartlomiej Zolnierkiewicz --- Reading git-diff-tree failed