Remove endian swapping abstraction

All supported kernels (and since 4.10) emit data in big endian. This
removes the run time abstraction and uses htobe32 unconditionally.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Change-Id: Ibdfae6b7b958c876e4ab0c89ecb130ec58ce2fac
diff --git a/targeting.cpp b/targeting.cpp
index 7dd68ef..a9f3d8e 100644
--- a/targeting.cpp
+++ b/targeting.cpp
@@ -60,22 +60,11 @@
     }
 }
 
-static uint32_t noEndianSwap(uint32_t data)
-{
-    return data;
-}
-
-static uint32_t endianSwap(uint32_t data)
-{
-    return htobe32(data);
-}
-
 Targeting::Targeting(const std::string& fsiMasterDev,
                      const std::string& fsiSlaveDir) :
     fsiMasterPath(fsiMasterDev),
     fsiSlaveBasePath(fsiSlaveDir)
 {
-    swap_endian_t swapper = endianSwap;
     std::regex exp{"fsi1/slave@([0-9]{2}):00", std::regex::extended};
 
     if (!fs::exists(fsiMasterPath))
@@ -86,13 +75,10 @@
         exp = expOld;
         fsiMasterPath = fsiMasterDevPathOld;
         fsiSlaveBasePath = fsiSlaveBaseDirOld;
-
-        // And don't swap the endianness of CFAM data
-        swapper = noEndianSwap;
     }
 
     // Always create P0, the FSI master.
-    targets.push_back(std::make_unique<Target>(0, fsiMasterPath, swapper));
+    targets.push_back(std::make_unique<Target>(0, fsiMasterPath));
     try
     {
         // Find the the remaining P9s dynamically based on which files show up
@@ -112,7 +98,7 @@
 
                 path += "/raw";
 
-                targets.push_back(std::make_unique<Target>(pos, path, swapper));
+                targets.push_back(std::make_unique<Target>(pos, path));
             }
         }
     }