Refactor for 3.4 kernel

Change-Id: I1e60b47f13681366b18bbd7263daff7b2f6b774b