diff options
Diffstat (limited to 'drivers/uio/uio_mf624.c')
| -rw-r--r-- | drivers/uio/uio_mf624.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/uio/uio_mf624.c b/drivers/uio/uio_mf624.c index 35187c052e8c..790412f8dfd5 100644 --- a/drivers/uio/uio_mf624.c +++ b/drivers/uio/uio_mf624.c @@ -1,21 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* - * UIO driver fo Humusoft MF624 DAQ card. + * UIO driver for Humusoft MF624 DAQ card. * Copyright (C) 2011 Rostislav Lisovy <lisovy@gmail.com>, * Czech Technical University in Prague - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/init.h> @@ -149,12 +136,12 @@ static int mf624_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { struct uio_info *info; - info = kzalloc(sizeof(struct uio_info), GFP_KERNEL); + info = devm_kzalloc(&dev->dev, sizeof(struct uio_info), GFP_KERNEL); if (!info) return -ENOMEM; if (pci_enable_device(dev)) - goto out_free; + return -ENODEV; if (pci_request_regions(dev, "mf624")) goto out_disable; @@ -202,8 +189,6 @@ out_release: out_disable: pci_disable_device(dev); -out_free: - kfree(info); return -ENODEV; } @@ -220,8 +205,6 @@ static void mf624_pci_remove(struct pci_dev *dev) iounmap(info->mem[0].internal_addr); iounmap(info->mem[1].internal_addr); iounmap(info->mem[2].internal_addr); - - kfree(info); } static const struct pci_device_id mf624_pci_id[] = { @@ -238,5 +221,6 @@ static struct pci_driver mf624_pci_driver = { MODULE_DEVICE_TABLE(pci, mf624_pci_id); module_pci_driver(mf624_pci_driver); +MODULE_DESCRIPTION("UIO driver for Humusoft MF624 DAQ card"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Rostislav Lisovy <lisovy@gmail.com>"); |
