From patchwork Thu Mar 21 18:45:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 2316551 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D790E400E6 for ; Thu, 21 Mar 2013 18:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072Ab3CUSp3 (ORCPT ); Thu, 21 Mar 2013 14:45:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48580 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751885Ab3CUSp2 convert rfc822-to-8bit (ORCPT ); Thu, 21 Mar 2013 14:45:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2LIjEl5007441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Mar 2013 14:45:14 -0400 Received: from localhost.localdomain (vpn1-6-35.gru2.redhat.com [10.97.6.35]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2LIjA3t025143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 21 Mar 2013 14:45:12 -0400 Date: Thu, 21 Mar 2013 15:45:09 -0300 From: Mauro Carvalho Chehab To: Randy Dunlap Cc: Geert Uytterhoeven , Linux Kernel Development , Janne Grunau , linux-media , Hans Verkuil Subject: Re: [PATCH] media: fix hdpvr build warning Message-ID: <20130321154509.46ad14e3@redhat.com> In-Reply-To: <513F769D.6040306@infradead.org> References: <513F769D.6040306@infradead.org> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em Tue, 12 Mar 2013 11:40:29 -0700 Randy Dunlap escreveu: > From: Randy Dunlap > > Fix build warning in hdpvr: > > drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef] > > Signed-off-by: Randy Dunlap > Reported-by: Geert Uytterhoeven > Cc: Janne Grunau From time to time, people used to write those checks wrong. So, we're now using a macro to avoid those problems (IS_ENABLED). The better is to also use it here. - [PATCH] Use the proper check for I2C support As reported by Geert Uytterhoeven : drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef] Signed-off-by: Mauro Carvalho Chehab Cheers, Mauro --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index da6b779..554d2eb 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c @@ -1238,7 +1238,7 @@ static void hdpvr_device_release(struct video_device *vdev) v4l2_device_unregister(&dev->v4l2_dev); /* deregister I2C adapter */ -#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) mutex_lock(&dev->i2c_mutex); i2c_del_adapter(&dev->i2c_adapter); mutex_unlock(&dev->i2c_mutex);