NTB: Correct debugfs to work with more than 1 NTB Device
authorJon Mason <jon.mason@intel.com>
Tue, 30 Jul 2013 22:58:49 +0000 (15:58 -0700)
committerJon Mason <jon.mason@intel.com>
Tue, 3 Sep 2013 18:14:54 +0000 (11:14 -0700)
commit1517a3f21a1dd321f16bcf44204bddff9d21abd0
tree45b8eb39ea33fae5f66af89376f5029e45d09127
parentb6750cfe0710a14fd147ba27fddbecae8ba88c77
NTB: Correct debugfs to work with more than 1 NTB Device

Debugfs was setup in NTB to only have a single debugfs directory.  This
resulted in the leaking of debugfs directories and files when multiple
NTB devices were present, due to each device stomping on the variables
containing the previous device's values (thus preventing them from being
freed on cleanup).  Correct this by creating a secondary directory of
the PCI BDF for each device present, and nesting the previously existing
information in those directories.

Signed-off-by: Jon Mason <jon.mason@intel.com>
drivers/ntb/ntb_hw.c
drivers/ntb/ntb_hw.h
drivers/ntb/ntb_transport.c