device-dax: Add a 'modalias' attribute to DAX 'bus' devices
authorVishal Verma <vishal.l.verma@intel.com>
Fri, 22 Feb 2019 23:58:54 +0000 (16:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Feb 2019 05:03:48 +0000 (21:03 -0800)
commitc347bd71dcdb2d0ac8b3a771486584dca8c8dd80
treef83ed64c3db29bc6b3a55f73a62b42d3cb49c62b
parent21c75763a3ae18679e5c4e2260aa9379b073566b
device-dax: Add a 'modalias' attribute to DAX 'bus' devices

Add a 'modalias' attribute to devices under the DAX bus so that userspace
is able to dynamically load modules as needed.

Normally, udev can get the modalias from 'uevent', and that is correctly
set up by the DAX bus. However other tooling such as 'libndctl' for
interacting with drivers/nvdimm/, and 'libdaxctl' for drivers/dax/ can
also use the modalias to dynamically load modules via libkmod lookups.

The 'nd' bus set up by the libnvdimm subsystem exports a modalias
attribute. Imitate this to export the same for the 'dax' bus.

Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dax/bus.c