Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753029Ab2KTWXQ (ORCPT ); Tue, 20 Nov 2012 17:23:16 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:32959 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271Ab2KTWXP (ORCPT ); Tue, 20 Nov 2012 17:23:15 -0500 MIME-Version: 1.0 Date: Tue, 20 Nov 2012 14:23:14 -0800 X-Google-Sender-Auth: JdjDaNP1Krj3FxeuO2c99nUqRN4 Message-ID: Subject: Device tree node to major/minor? From: Simon Glass To: lk Cc: Devicetree Discuss , Che-liang Chiou Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 834 Lines: 21 Hi, I hope this is a stupid question with an easy answer, but I cannot find it. I have a device tree node for an mmc block device and I want to use that block device from another driver. I have a phandle which lets me get the node of the mmc device, but I am not sure how to convert that into a block_device. In order to do so, I think I need a major/minor number. Of course the phandle might in fact point to a SCSI driver and I want that to work correctly also. I imagine I might be able to search through the wonders of sysfs in user space, but is there a better way? Thanks, Simon -- 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/