falcon.c (50551b15c760b3da8ad6284d0518013d1b4f437f) | falcon.c (400c2a456ce4b89fd286f009dfad0429020ee834) |
---|---|
1/* 2 * Copyright 2012 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 321 unchanged lines hidden (view full) --- 330 .init = nvkm_falcon_init, 331 .fini = nvkm_falcon_fini, 332 .intr = nvkm_falcon_intr, 333 .fifo.sclass = nvkm_falcon_oclass_get, 334 .cclass = &nvkm_falcon_cclass, 335}; 336 337int | 1/* 2 * Copyright 2012 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 321 unchanged lines hidden (view full) --- 330 .init = nvkm_falcon_init, 331 .fini = nvkm_falcon_fini, 332 .intr = nvkm_falcon_intr, 333 .fifo.sclass = nvkm_falcon_oclass_get, 334 .cclass = &nvkm_falcon_cclass, 335}; 336 337int |
338nvkm_falcon_new__(const struct nvkm_falcon_func *func, bool old, struct nvkm_device *device, | 338nvkm_falcon_new_(const struct nvkm_falcon_func *func, struct nvkm_device *device, |
339 enum nvkm_subdev_type type, int inst, bool enable, u32 addr, 340 struct nvkm_engine **pengine) 341{ 342 struct nvkm_falcon *falcon; 343 344 if (!(falcon = kzalloc(sizeof(*falcon), GFP_KERNEL))) 345 return -ENOMEM; 346 falcon->func = func; 347 falcon->addr = addr; 348 falcon->code.data = func->code.data; 349 falcon->code.size = func->code.size; 350 falcon->data.data = func->data.data; 351 falcon->data.size = func->data.size; 352 *pengine = &falcon->engine; 353 | 339 enum nvkm_subdev_type type, int inst, bool enable, u32 addr, 340 struct nvkm_engine **pengine) 341{ 342 struct nvkm_falcon *falcon; 343 344 if (!(falcon = kzalloc(sizeof(*falcon), GFP_KERNEL))) 345 return -ENOMEM; 346 falcon->func = func; 347 falcon->addr = addr; 348 falcon->code.data = func->code.data; 349 falcon->code.size = func->code.size; 350 falcon->data.data = func->data.data; 351 falcon->data.size = func->data.size; 352 *pengine = &falcon->engine; 353 |
354 return nvkm_engine_ctor_(&nvkm_falcon, old, device, type, inst, enable, &falcon->engine); | 354 return nvkm_engine_ctor(&nvkm_falcon, device, type, inst, enable, &falcon->engine); |
355} | 355} |