Removes workaround for duplicate device_added events

Change-Id: I2144b3a6f1c226664f8c30bbb79963a570c9b4b6
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
index a891e40..70aafd4 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java
@@ -151,52 +151,27 @@
     private ScheduledExecutorService accumulatorExecutorService
         = newSingleThreadScheduledExecutor(groupedThreads("OfdpaPipeliner", "acc-%d", log));
 
-    protected AtomicBoolean ready = new AtomicBoolean(false);
-
     @Override
     public void init(DeviceId deviceId, PipelinerContext context) {
-        synchronized (this) {
-            if (isReady()) {
-                return;
-            }
+        this.deviceId = deviceId;
 
-            this.deviceId = deviceId;
-
-            serviceDirectory = context.directory();
-            coreService = serviceDirectory.get(CoreService.class);
-            flowRuleService = serviceDirectory.get(FlowRuleService.class);
-            groupService = serviceDirectory.get(GroupService.class);
-            flowObjectiveStore = context.store();
-            deviceService = serviceDirectory.get(DeviceService.class);
-            // Init the accumulator, if enabled
-            if (isAccumulatorEnabled(this)) {
-                accumulator = new ForwardingObjectiveAccumulator(context.accumulatorMaxObjectives(),
-                        context.accumulatorMaxBatchMillis(),
-                        context.accumulatorMaxIdleMillis());
-            }
-
-            initDriverId();
-            initGroupHander(context);
-
-            initializePipeline();
-            ready.set(true);
+        serviceDirectory = context.directory();
+        coreService = serviceDirectory.get(CoreService.class);
+        flowRuleService = serviceDirectory.get(FlowRuleService.class);
+        groupService = serviceDirectory.get(GroupService.class);
+        flowObjectiveStore = context.store();
+        deviceService = serviceDirectory.get(DeviceService.class);
+        // Init the accumulator, if enabled
+        if (isAccumulatorEnabled(this)) {
+            accumulator = new ForwardingObjectiveAccumulator(context.accumulatorMaxObjectives(),
+                    context.accumulatorMaxBatchMillis(),
+                    context.accumulatorMaxIdleMillis());
         }
-    }
 
-    @Override
-    public boolean isReady() {
-        return ready.get();
-    }
+        initDriverId();
+        initGroupHander(context);
 
-    @Override
-    public void cleanUp() {
-        synchronized (this) {
-            if (!isReady()) {
-                return;
-            }
-            ready.set(false);
-        }
-        log.info("Cleaning up...");
+        initializePipeline();
     }
 
     void setupAccumulatorForTests(int maxFwd, int maxBatchMS, int maxIdleMS) {
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
index 8ca774a..7e43cab 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
@@ -165,29 +165,23 @@
 
     @Override
     public void init(DeviceId deviceId, PipelinerContext context) {
-        synchronized (this) {
-            if (isReady()) {
-                return;
-            }
-
-            // Terminate internal references
-            // We are terminating the references here
-            // because when the device is offline the apps
-            // are still sending flowobjectives
-            if (groupChecker != null) {
-                groupChecker.shutdown();
-            }
-            // create a new executor at each init and a new empty queue
-            groupChecker = Executors.newSingleThreadScheduledExecutor(groupedThreads("onos/driver",
-                    "ovs-ofdpa-%d", log));
-            if (flowRuleQueue != null) {
-                flowRuleQueue.clear();
-            }
-            flowRuleQueue = new ConcurrentLinkedQueue<>();
-            groupCheckerLock = new ReentrantLock();
-            groupChecker.scheduleAtFixedRate(new PopVlanPuntGroupChecker(), 20, 50, TimeUnit.MILLISECONDS);
-            super.init(deviceId, context);
+        // Terminate internal references
+        // We are terminating the references here
+        // because when the device is offline the apps
+        // are still sending flowobjectives
+        if (groupChecker != null) {
+            groupChecker.shutdown();
         }
+        // create a new executor at each init and a new empty queue
+        groupChecker = Executors.newSingleThreadScheduledExecutor(groupedThreads("onos/driver",
+                "ovs-ofdpa-%d", log));
+        if (flowRuleQueue != null) {
+            flowRuleQueue.clear();
+        }
+        flowRuleQueue = new ConcurrentLinkedQueue<>();
+        groupCheckerLock = new ReentrantLock();
+        groupChecker.scheduleAtFixedRate(new PopVlanPuntGroupChecker(), 20, 50, TimeUnit.MILLISECONDS);
+        super.init(deviceId, context);
     }
 
     protected void processFilter(FilteringObjective filteringObjective,