1 /* 2 * Copyright (C) Leigh Brown 2002. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 */ 9 10 #include "of1275.h" 11 12 phandle instancetopackage(const ihandle instance)13instancetopackage(const ihandle instance) 14 { 15 struct prom_args { 16 char *service; 17 int nargs; 18 int nret; 19 ihandle instance; 20 phandle package; 21 } args; 22 23 args.service = "instance-to-package"; 24 args.nargs = 1; 25 args.nret = 1; 26 args.instance = instance; 27 (*of_prom_entry)(&args); 28 return args.package; 29 } 30