From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 20:06:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1130E3C; Sat, 27 Dec 2014 20:06:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD44B1B41; Sat, 27 Dec 2014 20:06:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBRK6HOj075801; Sat, 27 Dec 2014 20:06:17 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBRK6Hh2075800; Sat, 27 Dec 2014 20:06:17 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201412272006.sBRK6Hh2075800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 27 Dec 2014 20:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276316 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 20:06:18 -0000 Author: loos Date: Sat Dec 27 20:06:16 2014 New Revision: 276316 URL: https://svnweb.freebsd.org/changeset/base/276316 Log: Remove unnecessary code and, instead, use the provided iicbus_null_callback callback. Modified: head/sys/arm/ti/ti_i2c.c Modified: head/sys/arm/ti/ti_i2c.c ============================================================================== --- head/sys/arm/ti/ti_i2c.c Sat Dec 27 19:56:04 2014 (r276315) +++ head/sys/arm/ti/ti_i2c.c Sat Dec 27 20:06:16 2014 (r276316) @@ -473,38 +473,6 @@ out: return (err); } -/** - * ti_i2c_callback - as we only provide iicbus_transfer() interface - * we don't need to implement the serialization here. - * @dev: i2c device handle - * - * - * - * LOCKING: - * Called from timer context - * - * RETURNS: - * EH_HANDLED or EH_NOT_HANDLED - */ -static int -ti_i2c_callback(device_t dev, int index, caddr_t data) -{ - int error = 0; - - switch (index) { - case IIC_REQUEST_BUS: - break; - - case IIC_RELEASE_BUS: - break; - - default: - error = EINVAL; - } - - return (error); -} - static int ti_i2c_reset(struct ti_i2c_softc *sc, u_char speed) { @@ -955,7 +923,7 @@ static device_method_t ti_i2c_methods[] DEVMETHOD(ofw_bus_get_node, ti_i2c_get_node), /* iicbus interface */ - DEVMETHOD(iicbus_callback, ti_i2c_callback), + DEVMETHOD(iicbus_callback, iicbus_null_callback), DEVMETHOD(iicbus_reset, ti_i2c_iicbus_reset), DEVMETHOD(iicbus_transfer, ti_i2c_transfer),