diff options
Diffstat (limited to 'kernel/ethosu_driver.c')
-rw-r--r-- | kernel/ethosu_driver.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/ethosu_driver.c b/kernel/ethosu_driver.c index 6e5bfb9..342f501 100644 --- a/kernel/ethosu_driver.c +++ b/kernel/ethosu_driver.c @@ -38,8 +38,6 @@ #define MINOR_BASE 0 /* Minor version starts at 0 */ #define MINOR_COUNT 64 /* Allocate minor versions */ -#define DMA_ADDR_BITS 32 /* Number of address bits */ - /**************************************************************************** * Variables ****************************************************************************/ @@ -48,8 +46,6 @@ static struct class *ethosu_class; static dev_t devt; -static DECLARE_BITMAP(minors, MINOR_COUNT); - /**************************************************************************** * Rpmsg driver ****************************************************************************/ @@ -57,35 +53,24 @@ static DECLARE_BITMAP(minors, MINOR_COUNT); static int ethosu_rpmsg_probe(struct rpmsg_device *rpdev) { struct device *dev = &rpdev->dev; - int minor; int ret; - /* Reserve minor number for device node */ - minor = find_first_zero_bit(minors, MINOR_COUNT); - if (minor >= MINOR_COUNT) { - dev_err(dev, "No more minor numbers."); - - return -ENOMEM; - } + dev_info(dev, "%s", __FUNCTION__); /* Initialize device */ - ret = ethosu_dev_init(rpdev, ethosu_class, MKDEV(MAJOR(devt), minor)); + ret = ethosu_dev_init(rpdev, ethosu_class, devt); if (ret) return ret; - set_bit(minor, minors); - return 0; } static void ethosu_rpmsg_remove(struct rpmsg_device *rpdev) { struct device *dev = &rpdev->dev; - struct ethosu_device *edev = dev_get_drvdata(dev); dev_info(dev, "%s", __FUNCTION__); - clear_bit(MINOR(edev->devt), minors); ethosu_dev_deinit(rpdev); } |