xref: /haiku/src/add-ons/kernel/bus_managers/mmc/mmc_bus.cpp (revision 5bd0fbd13a1e832f91643aaa921fbc0879abd518)
1 /*
2  * Copyright 2018 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		B Krishnan Iyer, krishnaniyer97@gmail.com
7  */
8 #include "mmc_bus.h"
9 
10 
11 MMCBus::MMCBus(device_node* node)
12 	:
13 	fNode(node),
14 	fController(NULL),
15 	fCookie(NULL),
16 	fStatus(B_OK),
17 	fDriverCookie(NULL)
18 {
19 	CALLED();
20 	device_node* parent = gDeviceManager->get_parent_node(node);
21 	fStatus = gDeviceManager->get_driver(parent,
22 		(driver_module_info**)&fController, &fCookie);
23 	gDeviceManager->put_node(parent);
24 
25 	if (fStatus != B_OK) {
26 		ERROR("Not able to establish the bus %s\n",
27 			strerror(fStatus));
28 		return;
29 	}
30 }
31 
32 
33 MMCBus::~MMCBus()
34 {
35 	CALLED();
36 }
37 
38 
39 status_t
40 MMCBus::InitCheck()
41 {
42 	return fStatus;
43 }
44