From patchwork Tue Nov 2 03:22:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 296602 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA23MX6Y011359 for ; Tue, 2 Nov 2010 03:22:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755535Ab0KBDWa (ORCPT ); Mon, 1 Nov 2010 23:22:30 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:65482 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755546Ab0KBDW3 (ORCPT ); Mon, 1 Nov 2010 23:22:29 -0400 Received: by gyg4 with SMTP id 4so3718429gyg.19 for ; Mon, 01 Nov 2010 20:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=tkh67aCrU6d8HgCm0LP9761Mh6uJJ5sD+5goYV1U14Q=; b=NJKutt9RY54E64wajPTRWv6nnBRXx1R9lOrYbO3GwnVBBqYsfopdqmOG4Bon7TvEKi zlPYqcKcBh43vK6nf9NH7LP/nv/ouLI1FQBzfGsirvssO7hAT5mXsyEINsCqhbve2lyk 7Dw5D0UXJ4PC9KmnfezupOIg/JubB0CETMUzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=ffnSnZriZhHK9cF8y9PdIdfA9GCSnYQiBkimrAhn+hRbjIeRzupRZGE65yWhC/XyyR aTasMxbgI/6teyz7pO+3ksGvrnpymx/RScgXdPi6m+lVVwCToL7DIxPa5eVYtK8qctmU 4xr+kzcHFayPjleDdj4piMFEQpinPAzyRgDn8= Received: by 10.229.215.1 with SMTP id hc1mr10002010qcb.3.1288668148743; Mon, 01 Nov 2010 20:22:28 -0700 (PDT) Received: from bicker (pool-173-48-174-55.bstnma.fios.verizon.net [173.48.174.55]) by mx.google.com with ESMTPS id h28sm2718270vcr.19.2010.11.01.20.22.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 20:22:27 -0700 (PDT) Date: Tue, 2 Nov 2010 05:22:23 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Steven Toth , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] saa7164: make buffer smaller Message-ID: <20101102032223.GD14069@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Nov 2010 03:22:33 +0000 (UTC) diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index 1d9c5cb..8b3e844 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h @@ -448,7 +448,7 @@ struct saa7164_dev { int nr; int hwrevision; u32 board; - char name[32]; + char name[16]; /* firmware status */ struct saa7164_fw_status fw_status; diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index e1bac50..b66f78f 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c @@ -1001,7 +1001,7 @@ static int saa7164_dev_setup(struct saa7164_dev *dev) atomic_inc(&dev->refcount); dev->nr = saa7164_devcount++; - sprintf(dev->name, "saa7164[%d]", dev->nr); + snprintf(dev->name, sizeof(dev->name), "saa7164[%d]", dev->nr); mutex_lock(&devlist); list_add_tail(&dev->devlist, &saa7164_devlist);