From: Geert Uytterhoeven Date: Wed, 27 Aug 2014 14:36:03 +0000 (+0200) Subject: regmap: Split regmap_get_endian() in two functions X-Git-Tag: fixes-for-v3.18-merge-window~30^2~2^2~1^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf673fbc6342b1c2310cdfdc4ed99f18f866b8e4;p=pandora-kernel.git regmap: Split regmap_get_endian() in two functions Split regmap_get_endian() in two functions, regmap_get_reg_endian() and regmap_get_val_endian(). This allows to: - Get rid of the three switch()es on "type", incl. error handling in three "default" cases, - Get rid of the regmap_endian_type enum, - Get rid of the non-NULL check of "config" (regmap_init() already checks for that), - Get rid of the "endian" output parameters, and just return the regmap_endian enum value, as the functions can no longer fail. This saves 21 lines of code (despite the still-present one-comment-per-line over-documentation), and 30 bytes of code on ARM V7. Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Warren Signed-off-by: Mark Brown --- Reading git-diff-tree failed