.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * IOMMU sysfs class support |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2014 Red Hat, Inc. All rights reserved. |
---|
5 | 6 | * Author: Alex Williamson <alex.williamson@redhat.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <linux/device.h> |
---|
13 | 10 | #include <linux/iommu.h> |
---|
14 | | -#include <linux/module.h> |
---|
| 11 | +#include <linux/init.h> |
---|
15 | 12 | #include <linux/slab.h> |
---|
16 | 13 | |
---|
17 | 14 | /* |
---|
.. | .. |
---|
22 | 19 | NULL, |
---|
23 | 20 | }; |
---|
24 | 21 | |
---|
25 | | -static const struct attribute_group iommu_devices_attr_group = { |
---|
| 22 | +static const struct attribute_group devices_attr_group = { |
---|
26 | 23 | .name = "devices", |
---|
27 | 24 | .attrs = devices_attr, |
---|
28 | 25 | }; |
---|
29 | 26 | |
---|
30 | | -static const struct attribute_group *iommu_dev_groups[] = { |
---|
31 | | - &iommu_devices_attr_group, |
---|
| 27 | +static const struct attribute_group *dev_groups[] = { |
---|
| 28 | + &devices_attr_group, |
---|
32 | 29 | NULL, |
---|
33 | 30 | }; |
---|
34 | 31 | |
---|
35 | | -static void iommu_release_device(struct device *dev) |
---|
| 32 | +static void release_device(struct device *dev) |
---|
36 | 33 | { |
---|
37 | 34 | kfree(dev); |
---|
38 | 35 | } |
---|
39 | 36 | |
---|
40 | 37 | static struct class iommu_class = { |
---|
41 | 38 | .name = "iommu", |
---|
42 | | - .dev_release = iommu_release_device, |
---|
43 | | - .dev_groups = iommu_dev_groups, |
---|
| 39 | + .dev_release = release_device, |
---|
| 40 | + .dev_groups = dev_groups, |
---|
44 | 41 | }; |
---|
45 | 42 | |
---|
46 | 43 | static int __init iommu_dev_init(void) |
---|