Removes workaround for duplicate device_added events

Change-Id: I2144b3a6f1c226664f8c30bbb79963a570c9b4b6
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/CpqdOfdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/CpqdOfdpa2Pipeline.java
index 7d9deb1..980d1f6 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/CpqdOfdpa2Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/CpqdOfdpa2Pipeline.java
@@ -195,30 +195,24 @@
 
     @Override
     public void init(DeviceId deviceId, PipelinerContext context) {
-        synchronized (this) {
-            if (isReady()) {
-                return;
+        if (supportPuntGroup()) {
+            // 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();
             }
-
-            if (supportPuntGroup()) {
-                // 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",
-                        "cpqd-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);
+            // create a new executor at each init and a new empty queue
+            groupChecker = Executors.newSingleThreadScheduledExecutor(groupedThreads("onos/driver",
+                    "cpqd-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);
         }
     }
     /*
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 2a400ba..8600210 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
@@ -144,52 +144,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) {