Please note that this fix might by incompatible with the new DASH library being used for some releases now.
You can use the fix from here safely and it is not needed for all devices.
I have tested your fix on Xperia Mini and that didn't work. The akmd8975 file is exactly the same as the OP, but that was not enought to make the accelerometer to work correctly.
After flashing the file from the OP it worked on my Xperia Mini with FXP139 - CM9.1.