diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-06-28 15:54:56 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-07-20 17:14:25 +0200 |
commit | 04ad327f277ec3bc3c05f5a5c19d58600882d38e (patch) | |
tree | 662c4326b43397fd9019000afabc3524d9f08a2d /drivers/gpu/drm/i915/intel_sdvo.c | |
parent | 3c58141165bc2476a5851142f5199d63c39c30c8 (diff) | |
download | lwn-04ad327f277ec3bc3c05f5a5c19d58600882d38e.tar.gz lwn-04ad327f277ec3bc3c05f5a5c19d58600882d38e.zip |
drm: i915: use ARRAY_SIZE
Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 76993ac16cc1..03c231be2273 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -392,13 +392,13 @@ static void intel_sdvo_debug_write(struct intel_encoder *intel_encoder, u8 cmd, DRM_LOG_KMS("%02X ", ((u8 *)args)[i]); for (; i < 8; i++) DRM_LOG_KMS(" "); - for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) { + for (i = 0; i < ARRAY_SIZE(sdvo_cmd_names); i++) { if (cmd == sdvo_cmd_names[i].cmd) { DRM_LOG_KMS("(%s)", sdvo_cmd_names[i].name); break; } } - if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0])) + if (i == ARRAY_SIZE(sdvo_cmd_names)) DRM_LOG_KMS("(%02X)", cmd); DRM_LOG_KMS("\n"); } |