summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_encoder_slave.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-05-07 23:32:16 +0400
committerDave Airlie <airlied@redhat.com>2013-05-10 08:46:03 +0400
commitd1fd3ddc469b576e36184f2bd02c0301d80118d3 (patch)
tree3fd39ec0d4a6893094a28170615b1b78d18a2b11 /drivers/gpu/drm/drm_encoder_slave.c
parentebbd97ad885c3c41f56a5f81c27b1ea8156a0f07 (diff)
downloadlinux-d1fd3ddc469b576e36184f2bd02c0301d80118d3.tar.xz
drm: refactor call to request_module
This reduces the size of the stack frame when calling request_module(). Performing the sprintf before the call is not needed. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_encoder_slave.c')
-rw-r--r--drivers/gpu/drm/drm_encoder_slave.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c
index 48c52f7df4e6..0cfb60f54766 100644
--- a/drivers/gpu/drm/drm_encoder_slave.c
+++ b/drivers/gpu/drm/drm_encoder_slave.c
@@ -54,16 +54,12 @@ int drm_i2c_encoder_init(struct drm_device *dev,
struct i2c_adapter *adap,
const struct i2c_board_info *info)
{
- char modalias[sizeof(I2C_MODULE_PREFIX)
- + I2C_NAME_SIZE];
struct module *module = NULL;
struct i2c_client *client;
struct drm_i2c_encoder_driver *encoder_drv;
int err = 0;
- snprintf(modalias, sizeof(modalias),
- "%s%s", I2C_MODULE_PREFIX, info->type);
- request_module(modalias);
+ request_module("%s%s", I2C_MODULE_PREFIX, info->type);
client = i2c_new_device(adap, info);
if (!client) {