From patchwork Fri Dec 5 14:19:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 5444121 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D77BC9F1D4 for ; Fri, 5 Dec 2014 14:19:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1263C20265 for ; Fri, 5 Dec 2014 14:19:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2781720256 for ; Fri, 5 Dec 2014 14:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751134AbaLEOTj (ORCPT ); Fri, 5 Dec 2014 09:19:39 -0500 Received: from lb2-smtp-cloud3.xs4all.net ([194.109.24.26]:41954 "EHLO lb2-smtp-cloud3.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbaLEOTj (ORCPT ); Fri, 5 Dec 2014 09:19:39 -0500 Received: from tschai.lan ([173.38.208.169]) by smtp-cloud3.xs4all.net with ESMTP id PqKa1p0053fpmMZ01qKd7T; Fri, 05 Dec 2014 15:19:37 +0100 Received: from tschai.cisco.com (localhost [127.0.0.1]) by tschai.lan (Postfix) with ESMTPSA id 4B2802A009F; Fri, 5 Dec 2014 15:19:25 +0100 (CET) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: sakari.ailus@iki.fi, Hans Verkuil Subject: [PATCH for v3.19 1/4] v4l2-mediabus.h: use two __u16 instead of two __u32 Date: Fri, 5 Dec 2014 15:19:21 +0100 Message-Id: <1417789164-28468-2-git-send-email-hverkuil@xs4all.nl> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1417789164-28468-1-git-send-email-hverkuil@xs4all.nl> References: <1417789164-28468-1-git-send-email-hverkuil@xs4all.nl> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil The ycbcr_enc and quantization fields do not need a __u32. Switch to two __u16 types, thus preserving alignment and avoiding holes in the struct. This makes one more __u32 available for future expansion. Suggested by Sakari Ailus. Signed-off-by: Hans Verkuil --- include/uapi/linux/v4l2-mediabus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index 5a86d8e..26db206 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h @@ -31,9 +31,9 @@ struct v4l2_mbus_framefmt { __u32 code; __u32 field; __u32 colorspace; - __u32 ycbcr_enc; - __u32 quantization; - __u32 reserved[5]; + __u16 ycbcr_enc; + __u16 quantization; + __u32 reserved[6]; }; #ifndef __KERNEL__