UBI: cleanup usage of try_module_get
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Wed, 11 Jul 2007 08:11:45 +0000 (17:11 +0900)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 18 Jul 2007 13:58:45 +0000 (16:58 +0300)
commit2db61c95c03d08bb885c87a816540e75190c924a
tree1376072b9ed06ff51e35c50be6fec569ee7a3e61
parentd08c3b78b8c46a01b8fa59037a0d9fbb777fb465
UBI: cleanup usage of try_module_get

The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not
offer real protection against unexpected driver unloads, since we could
be preempted before try_modules_get gets executed. It is the caller who
should manipulate the refcounts. Besides, ubi_get_device_info is an
exported symbol which guarantees protection when accessed through
symbol_get.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/kapi.c