Skip to content

Commit

Permalink
iommu: Rename struct iommu_device
Browse files Browse the repository at this point in the history
The struct is used to link devices to iommu-groups, so
'struct group_device' is a better name. Further this makes
the name iommu_device available for a struct representing
hardware iommus.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Feb 10, 2017
1 parent 534766d commit c09e22d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct iommu_group {
struct iommu_domain *domain;
};

struct iommu_device {
struct group_device {
struct list_head list;
struct device *dev;
char *name;
Expand Down Expand Up @@ -374,7 +374,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group,
int iommu_group_add_device(struct iommu_group *group, struct device *dev)
{
int ret, i = 0;
struct iommu_device *device;
struct group_device *device;

device = kzalloc(sizeof(*device), GFP_KERNEL);
if (!device)
Expand Down Expand Up @@ -460,7 +460,7 @@ EXPORT_SYMBOL_GPL(iommu_group_add_device);
void iommu_group_remove_device(struct device *dev)
{
struct iommu_group *group = dev->iommu_group;
struct iommu_device *tmp_device, *device = NULL;
struct group_device *tmp_device, *device = NULL;

pr_info("Removing device %s from group %d\n", dev_name(dev), group->id);

Expand Down Expand Up @@ -495,7 +495,7 @@ EXPORT_SYMBOL_GPL(iommu_group_remove_device);

static int iommu_group_device_count(struct iommu_group *group)
{
struct iommu_device *entry;
struct group_device *entry;
int ret = 0;

list_for_each_entry(entry, &group->devices, list)
Expand All @@ -518,7 +518,7 @@ static int iommu_group_device_count(struct iommu_group *group)
static int __iommu_group_for_each_dev(struct iommu_group *group, void *data,
int (*fn)(struct device *, void *))
{
struct iommu_device *device;
struct group_device *device;
int ret = 0;

list_for_each_entry(device, &group->devices, list) {
Expand Down

0 comments on commit c09e22d

Please sign in to comment.