Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756643AbXJKWqw (ORCPT ); Thu, 11 Oct 2007 18:46:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754018AbXJKWqo (ORCPT ); Thu, 11 Oct 2007 18:46:44 -0400 Received: from mga03.intel.com ([143.182.124.21]:23917 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753463AbXJKWqn (ORCPT ); Thu, 11 Oct 2007 18:46:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.21,261,1188802800"; d="scan'208";a="296985625" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C80C58.809E0DAF" Subject: RE: TPM driver changes to support multiple locality Date: Thu, 11 Oct 2007 15:46:03 -0700 Message-ID: In-Reply-To: <20071011143917.0eb75029.randy.dunlap@oracle.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: TPM driver changes to support multiple locality Thread-Index: AcgMT0fIQsOJK0MESJaB8CeFyFAf6gAB81gg References: <27383.1192045583@turing-police.cc.vt.edu><20071011115429.92326cbd.randy.dunlap@oracle.com> <20071011143917.0eb75029.randy.dunlap@oracle.com> From: "Agarwal, Lomesh" To: "Randy Dunlap" Cc: , X-OriginalArrivalTime: 11 Oct 2007 22:46:04.0395 (UTC) FILETIME=[812D63B0:01C80C58] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9458 Lines: 137 This is a multi-part message in MIME format. ------_=_NextPart_001_01C80C58.809E0DAF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Attached is the patch which resolves all the comments. ------_=_NextPart_001_01C80C58.809E0DAF Content-Type: application/octet-stream; name="tpm_tis.c.patch" Content-Transfer-Encoding: base64 Content-Description: tpm_tis.c.patch Content-Disposition: attach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Qog CX0gZWxzZQ0KIAkJcG5wX3VucmVnaXN0ZXJfZHJpdmVyKCZ0aXNfcG5wX2RyaXZlcik7DQogfQ0K ------_=_NextPart_001_01C80C58.809E0DAF-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/