Enable Apex on ARM64, fix compile issue

- Change from X86 only to X86 or ARM64 in Kconfig
- refcount_read doesn't exist in 4.11, so use atomic_read instead. This
is the same call that refcount_read in 4.12+ would make.

Change-Id: I48c97dd8c14136dcccaa8378b3a931a7872e1289
This commit is contained in:
Alex Van Damme
2018-07-23 15:52:12 -07:00
parent 883c9a9fa9
commit d737e80b17
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ menu "Gasket devices"
config STAGING_GASKET_FRAMEWORK
tristate "Gasket framework"
depends on PCI && X86_64
depends on PCI && (X86_64 || ARM64)
help
This framework supports Gasket-compatible devices, such as Apex.
It is required for any of the following module(s).

View File

@@ -108,7 +108,7 @@ static void put_mapping(struct gasket_sysfs_mapping *mapping)
}
mutex_lock(&mapping->mutex);
if (refcount_read(&mapping->refcount.refcount) == 0)
if (atomic_read(&mapping->refcount.refcount) == 0)
gasket_nodev_error("Refcount is already 0!");
if (kref_put(&mapping->refcount, release_entry)) {
gasket_nodev_info("Removing Gasket sysfs mapping, device %s",