/* * Copyright(c) 2013-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */#ifndef __LINUX_ND_H__#define __LINUX_ND_H__#include <linux/ndctl.h>#include <linux/device.h>structnd_device_driver{structdevice_driverdrv;unsignedlongtype;int(*probe)(structdevice*dev);int(*remove)(structdevice*dev);};staticinlinestructnd_device_driver*to_nd_device_driver(structdevice_driver*drv){returncontainer_of(drv,structnd_device_driver,drv);}#define MODULE_ALIAS_ND_DEVICE(type) \ MODULE_ALIAS("nd:t" __stringify(type) "*")#define ND_DEVICE_MODALIAS_FMT "nd:t%d"int__must_check__nd_driver_register(structnd_device_driver*nd_drv,structmodule*module,constchar*mod_name);#define nd_driver_register(driver) \ __nd_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)#endif /* __LINUX_ND_H__ */