libhardware_legacy: code cleanup

Change-Id: I4c6755a8760f8a988b664b0bbe1e9501904b7e06