104b88677SBen Skeggs /* 204b88677SBen Skeggs * Copyright 2016 Red Hat Inc. 304b88677SBen Skeggs * 404b88677SBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a 504b88677SBen Skeggs * copy of this software and associated documentation files (the "Software"), 604b88677SBen Skeggs * to deal in the Software without restriction, including without limitation 704b88677SBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense, 804b88677SBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the 904b88677SBen Skeggs * Software is furnished to do so, subject to the following conditions: 1004b88677SBen Skeggs * 1104b88677SBen Skeggs * The above copyright notice and this permission notice shall be included in 1204b88677SBen Skeggs * all copies or substantial portions of the Software. 1304b88677SBen Skeggs * 1404b88677SBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1504b88677SBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1604b88677SBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1704b88677SBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1804b88677SBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1904b88677SBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2004b88677SBen Skeggs * OTHER DEALINGS IN THE SOFTWARE. 2104b88677SBen Skeggs * 2204b88677SBen Skeggs * Authors: Ben Skeggs 2304b88677SBen Skeggs */ 2404b88677SBen Skeggs #include <nvif/driver.h> 2504b88677SBen Skeggs #include <nvif/client.h> 2604b88677SBen Skeggs 2704b88677SBen Skeggs int 2804b88677SBen Skeggs nvif_driver_init(const char *drv, const char *cfg, const char *dbg, 2904b88677SBen Skeggs const char *name, u64 device, struct nvif_client *client) 3004b88677SBen Skeggs { 31ca6eef9bSBen Skeggs int ret; 3204b88677SBen Skeggs 33ca6eef9bSBen Skeggs client->driver = &nvif_driver_nvkm; 3404b88677SBen Skeggs 35ca6eef9bSBen Skeggs ret = client->driver->init(name, device, cfg, dbg, &client->object.priv); 36ca6eef9bSBen Skeggs if (ret) 3704b88677SBen Skeggs return ret; 38ca6eef9bSBen Skeggs 39*a897f65bSBen Skeggs return nvif_client_ctor(client, name, client); 4004b88677SBen Skeggs } 41