[PATCH openEuler-1.0-LTS 02/36] drivers/base/memory.c: Use DEVICE_ATTR_RO and friends